Discussion:
[Axis2]Empty namespace issuein soap message
Randall Vasquez
2015-06-10 00:50:26 UTC
Permalink
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.
Jack Sprat
2015-06-10 21:11:14 UTC
Permalink
Where are the instructions to unsubscribe from this list?



On Tuesday, June 9, 2015 8:51 PM, Randall Vasquez <***@actuate.com> wrote:


<!--#yiv8730629962 _filtered #yiv8730629962 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv8730629962 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv8730629962 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv8730629962 #yiv8730629962 p.yiv8730629962MsoNormal, #yiv8730629962 li.yiv8730629962MsoNormal, #yiv8730629962 div.yiv8730629962MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}#yiv8730629962 a:link, #yiv8730629962 span.yiv8730629962MsoHyperlink {color:blue;text-decoration:underline;}#yiv8730629962 a:visited, #yiv8730629962 span.yiv8730629962MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv8730629962 p.yiv8730629962MsoAcetate, #yiv8730629962 li.yiv8730629962MsoAcetate, #yiv8730629962 div.yiv8730629962MsoAcetate {margin:0cm;margin-bottom:.0001pt;font-size:8.0pt;font-family:"Tahoma", "sans-serif";}#yiv8730629962 span.yiv8730629962BalloonTextChar {font-family:"Tahoma", "sans-serif";}#yiv8730629962 span.yiv8730629962EmailStyle19 {font-family:"Calibri", "sans-serif";color:windowtext;}#yiv8730629962 span.yiv8730629962EmailStyle20 {font-family:"Calibri", "sans-serif";color:#1F497D;}#yiv8730629962 .yiv8730629962MsoChpDefault {font-size:10.0pt;} _filtered #yiv8730629962 {margin:72.0pt 72.0pt 72.0pt 72.0pt;}#yiv8730629962 div.yiv8730629962WordSection1 {}-->   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.
Andreas Veithen
2015-06-11 18:27:16 UTC
Permalink
In the RFC822 headers of every mail you get from this list.

Andreas

On Wed, Jun 10, 2015 at 10:11 PM, Jack Sprat
Post by Jack Sprat
Where are the instructions to unsubscribe from this list?
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.
<Envelope xmlns:soapenv=""....
</Envelope>
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: java-user-***@axis.apache.org
For additional commands, e-mail: java-user-***@axis.apache.org
T. Allen
2015-07-01 13:55:39 UTC
Permalink
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: java-user-***@axis.apache.org
For additional commands, e-mail: java-user-***@axis.apache.org
Andreas Veithen
2015-07-01 19:17:22 UTC
Permalink
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
Post by T. Allen
<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>
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: java-user-***@axis.apache.org
For additional commands, e-mail: java-user-***@axis.apache.org
Oliver Braun
2015-07-02 07:19:00 UTC
Permalink
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
Post by T. Allen
<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>
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: java-user-***@axis.apache.org
For additional commands, e-mail: java-user-***@axis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-***@axis.apache.org
For additional commands, e-mail: java-user-***@axis.apache.org
Jack Sprat
2015-07-27 15:00:15 UTC
Permalink
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
robertlazarski .
2015-07-27 15:03:55 UTC
Permalink
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
Post by Jack Sprat
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
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: java-user-***@axis.apache.org
For additional commands, e-mail: java-user-***@axis.apache.org
Jack Sprat
2015-07-27 15:12:13 UTC
Permalink
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 . <***@gmail.com> 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
Post by Jack Sprat
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
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
robertlazarski .
2015-07-27 15:19:04 UTC
Permalink
On Mon, Jul 27, 2015 at 12:12 PM, Jack Sprat
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 .
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
Post by Jack Sprat
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
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: java-user-***@axis.apache.org
For additional commands, e-mail: java-user-***@axis.apache.org
Jack Sprat
2015-07-27 15:55:20 UTC
Permalink
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 . <***@gmail.com> wrote:


On Mon, Jul 27, 2015 at 12:12 PM, Jack Sprat
Post by Jack Sprat
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 .
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
Post by Jack Sprat
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
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

Loading...