[Axis2]Empty namespace issuein soap message

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[Axis2]Empty namespace issuein soap message

Randall Vasquez

 

A client has specified that it is a security concern for them to show component/class names within error messages/faults

I have a webservice set up and have tried to capture this issue using a handler but it seems that the issue is caught before any handler can be invoked.

 

The issue occurs when an empty namespace is used.

 

Example:

Partial Message:

<Envelope xmlns:soapenv=""....

</Envelope>

 

Partial Response:

com.ctc.wstx.exc.WstxParsingException: Non-default namespace can not map to empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents

at [row,col {unknown-source}]: [1,26]

 

This seems to be caught in the Axis Servlet before any flows or handlers can be called.

 

Any help would be appreciated,

 

Randall.

Reply | Threaded
Open this post in threaded view
|

Unsubscribe instructions

Jack Sprat-2
Where are the instructions to unsubscribe from this list?




On Tuesday, June 9, 2015 8:51 PM, Randall Vasquez <[hidden email]> wrote:


 
A client has specified that it is a security concern for them to show component/class names within error messages/faults
I have a webservice set up and have tried to capture this issue using a handler but it seems that the issue is caught before any handler can be invoked.
 
The issue occurs when an empty namespace is used.
 
Example:
Partial Message:
<Envelope xmlns:soapenv=""....
</Envelope>
 
Partial Response:
com.ctc.wstx.exc.WstxParsingException: Non-default namespace can not map to empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents
at [row,col {unknown-source}]: [1,26]
 
This seems to be caught in the Axis Servlet before any flows or handlers can be called.
 
Any help would be appreciated,
 
Randall.


Reply | Threaded
Open this post in threaded view
|

Re: Unsubscribe instructions

Andreas Veithen-2
In the RFC822 headers of every mail you get from this list.

Andreas

On Wed, Jun 10, 2015 at 10:11 PM, Jack Sprat
<[hidden email]> wrote:

> Where are the instructions to unsubscribe from this list?
>
>
>
>
> On Tuesday, June 9, 2015 8:51 PM, Randall Vasquez <[hidden email]>
> wrote:
>
>
>
> A client has specified that it is a security concern for them to show
> component/class names within error messages/faults
> I have a webservice set up and have tried to capture this issue using a
> handler but it seems that the issue is caught before any handler can be
> invoked.
>
> The issue occurs when an empty namespace is used.
>
> Example:
> Partial Message:
> <Envelope xmlns:soapenv=""....
> </Envelope>
>
> Partial Response:
> com.ctc.wstx.exc.WstxParsingException: Non-default namespace can not map to
> empty URI (as per Namespace 1.0 # 2) in XML 1.0 documents
> at [row,col {unknown-source}]: [1,26]
>
> This seems to be caught in the Axis Servlet before any flows or handlers can
> be called.
>
> Any help would be appreciated,
>
> Randall.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Formatting BigDecimal element in response

T. Allen
I have an element defined as:

<xsd:simpleType name="ShipmentType">
<xsd:restriction base="decimal">
<xsd:enumeration value="50" />
<xsd:enumeration value="60" />
<xsd:enumeration value="77.5" />
</xsd:restriction>
</xsd:simpleType>

The class generated by the wsdl2java tool expects a BigDecimal parameter:

public void setShipment(java.math.BigDecimal ship)

The problem is that passing a value of 50 to the method produces a value
of "50.0" (no quotes) in the response.  How can I get the value
formatted as in the enumeration?  I want the values to appear as 50, 60
or 77.5.

Any advice or tips are much appreciated!

Thanks,
T


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Formatting BigDecimal element in response

Andreas Veithen-2
I doubt that there is any Web service framework that supports this use
case. The reason is that the XML schema spec clearly specifies that
"enumeration constrains the value space to a specified set of values."
[1] What you are asking for is to restrict the lexical space instead,
and there is no good reason for that.

Andreas

[1] http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#dt-enumeration

On Wed, Jul 1, 2015 at 2:55 PM, T. Allen <[hidden email]> wrote:

> I have an element defined as:
>
> <xsd:simpleType name="ShipmentType">
> <xsd:restriction base="decimal">
> <xsd:enumeration value="50" />
> <xsd:enumeration value="60" />
> <xsd:enumeration value="77.5" />
> </xsd:restriction>
> </xsd:simpleType>
>
> The class generated by the wsdl2java tool expects a BigDecimal parameter:
>
> public void setShipment(java.math.BigDecimal ship)
>
> The problem is that passing a value of 50 to the method produces a value of
> "50.0" (no quotes) in the response.  How can I get the value formatted as in
> the enumeration?  I want the values to appear as 50, 60 or 77.5.
>
> Any advice or tips are much appreciated!
>
> Thanks,
> T
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Formatting BigDecimal element in response

Oliver Braun-4
What about to look into the implementation of the generated class and change
it to the behavior you want?

Regards,

Oliver

-----Urspr√ľngliche Nachricht-----
From: Andreas Veithen
Sent: Wednesday, July 01, 2015 9:17 PM
To: java-user
Subject: Re: Formatting BigDecimal element in response

I doubt that there is any Web service framework that supports this use
case. The reason is that the XML schema spec clearly specifies that
"enumeration constrains the value space to a specified set of values."
[1] What you are asking for is to restrict the lexical space instead,
and there is no good reason for that.

Andreas

[1]
http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#dt-enumeration

On Wed, Jul 1, 2015 at 2:55 PM, T. Allen <[hidden email]> wrote:

> I have an element defined as:
>
> <xsd:simpleType name="ShipmentType">
> <xsd:restriction base="decimal">
> <xsd:enumeration value="50" />
> <xsd:enumeration value="60" />
> <xsd:enumeration value="77.5" />
> </xsd:restriction>
> </xsd:simpleType>
>
> The class generated by the wsdl2java tool expects a BigDecimal parameter:
>
> public void setShipment(java.math.BigDecimal ship)
>
> The problem is that passing a value of 50 to the method produces a value
> of
> "50.0" (no quotes) in the response.  How can I get the value formatted as
> in
> the enumeration?  I want the values to appear as 50, 60 or 77.5.
>
> Any advice or tips are much appreciated!
>
> Thanks,
> T
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Service endpoint not found

Jack Sprat-2
I know I've run in to this problem before but cannot recall the cause of it.  I have an Axis 1.6.1 service deployed.  When a request is made to the simple echo operation I get the following error:

The service cannot be found for the endpoint reference (EPR) http://mydomain.com/svcname/services/MyService

It looks like the service cannot find the WSDL.  What would cause this error?

Thanks,
T

Reply | Threaded
Open this post in threaded view
|

Re: Service endpoint not found

robertlazarski .
Can you access "The happy axis2 page" (axis2-web/index.jsp
I think?

That should show the state of the server and also the valid endpoint url's.

On Mon, Jul 27, 2015 at 12:00 PM, Jack Sprat
<[hidden email]> wrote:

> I know I've run in to this problem before but cannot recall the cause of it.
> I have an Axis 1.6.1 service deployed.  When a request is made to the simple
> echo operation I get the following error:
>
> The service cannot be found for the endpoint reference (EPR)
> http://mydomain.com/svcname/services/MyService
>
> It looks like the service cannot find the WSDL.  What would cause this
> error?
>
> Thanks,
> T
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Service endpoint not found

Jack Sprat-2
No, I cannot access that page.  There are no services with the axis2-web context root.  There are 7 other services running fine on this server.

Thanks,
T



On Monday, July 27, 2015 11:05 AM, robertlazarski . <[hidden email]> wrote:


Can you access "The happy axis2 page" (axis2-web/index.jsp
I think?

That should show the state of the server and also the valid endpoint url's.

On Mon, Jul 27, 2015 at 12:00 PM, Jack Sprat
<[hidden email]> wrote:

> I know I've run in to this problem before but cannot recall the cause of it.
> I have an Axis 1.6.1 service deployed.  When a request is made to the simple
> echo operation I get the following error:
>
> The service cannot be found for the endpoint reference (EPR)
> http://mydomain.com/svcname/services/MyService
>
> It looks like the service cannot find the WSDL.  What would cause this
> error?
>
> Thanks,
> T
Reply | Threaded
Open this post in threaded view
|

Re: Service endpoint not found

robertlazarski .
On Mon, Jul 27, 2015 at 12:12 PM, Jack Sprat
<[hidden email]> wrote:

> No, I cannot access that page.  There are no services with the axis2-web
> context root.  There are 7 other services running fine on this server.
>
> Thanks,
> T
>
>
>
> On Monday, July 27, 2015 11:05 AM, robertlazarski .
> <[hidden email]> wrote:
>
>
> Can you access "The happy axis2 page" (axis2-web/index.jsp
> I think?
>
> That should show the state of the server and also the valid endpoint url's.
>
> On Mon, Jul 27, 2015 at 12:00 PM, Jack Sprat
> <[hidden email]> wrote:
>> I know I've run in to this problem before but cannot recall the cause of
>> it.
>> I have an Axis 1.6.1 service deployed.  When a request is made to the
>> simple
>> echo operation I get the following error:
>>
>> The service cannot be found for the endpoint reference (EPR)
>> http://mydomain.com/svcname/services/MyService
>>
>> It looks like the service cannot find the WSDL.  What would cause this
>> error?
>>
>> Thanks,
>> T
>

Try:

http://mydomain.com/axis2-web/HappyAxis.jsp

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Service endpoint not found

Jack Sprat-2
No. HTTP error 404 - not found.

This is running on Websphere 8.0.  There is something "off" on this particular service.

Thanks,
T



On Monday, July 27, 2015 11:20 AM, robertlazarski . <[hidden email]> wrote:


On Mon, Jul 27, 2015 at 12:12 PM, Jack Sprat

<[hidden email]> wrote:

> No, I cannot access that page.  There are no services with the axis2-web
> context root.  There are 7 other services running fine on this server.
>
> Thanks,
> T
>
>
>
> On Monday, July 27, 2015 11:05 AM, robertlazarski .
> <[hidden email]> wrote:
>
>
> Can you access "The happy axis2 page" (axis2-web/index.jsp
> I think?
>
> That should show the state of the server and also the valid endpoint url's.
>
> On Mon, Jul 27, 2015 at 12:00 PM, Jack Sprat
> <[hidden email]> wrote:
>> I know I've run in to this problem before but cannot recall the cause of
>> it.
>> I have an Axis 1.6.1 service deployed.  When a request is made to the
>> simple
>> echo operation I get the following error:
>>
>> The service cannot be found for the endpoint reference (EPR)
>> http://mydomain.com/svcname/services/MyService
>>
>> It looks like the service cannot find the WSDL.  What would cause this
>> error?
>>
>> Thanks,
>> T

>

Try:

http://mydomain.com/axis2-web/HappyAxis.jsp

[hidden email]