You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Stefan Schmidt (JIRA)" <de...@geronimo.apache.org> on 2005/09/04 03:39:31 UTC

[jira] Created: (GERONIMO-975) Problems with SOAPArrayType

Problems with SOAPArrayType
---------------------------

         Key: GERONIMO-975
         URL: http://issues.apache.org/jira/browse/GERONIMO-975
     Project: Geronimo
        Type: Bug
  Components: webservices  
    Versions: 1.0-M5    
    Reporter: Stefan Schmidt


I am having a number of problems caused by array handling in SOAP. 

Using sun's jwsdp I generated a simple JAX-RPC Web service which is supposed to return an array of Strings. I used the Java2WSDL approach for a JSE - meaning I generated heavyweight mappings and a wsdl file for my simple WS and deployed it to G. While the WS works in general it shows the following warning:

09:21:29,737 WARN  [HeavyweightTypeInfoBuilder] No soap array info for schematype: T=StringArray@http://arrays/java/lang

This is due to a non-spec conformant wsdl array mapping generated by the jwsdp:
	<types>
		<schema targetNamespace="http://arrays/java/lang"
			xmlns:tns="http://arrays/java/lang"
			xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
			xmlns="http://www.w3.org/2001/XMLSchema">
			<complexType name="StringArray">
				<sequence>
					<element name="value" type="string" nillable="true"
						minOccurs="0" maxOccurs="unbounded" />
				</sequence>
			</complexType>
		</schema>
	</types>

This works for this web service which returns the following response (apart from the warning):
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
   <result xsi:type="xsd:string" xmlns="">String 1</result>
   <result xsi:type="xsd:string" xmlns="">String 2</result>
   <result xsi:type="xsd:string" xmlns="">String 3</result>
   <result xsi:type="xsd:string" xmlns="">String 4</result>
  </getStringArrayResponse>
 </soapenv:Body>
</soapenv:Envelope>

However, when I switch on  WSS4J security the response looks quite different (SOAP body only):
 <soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="id-1197222">
  <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
   <result xmlns="" xmlns:ns1="http://arrays/java/lang"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
soapenc:arrayType="ns1:StringArray[4]" xsi:type="soapenc:Array">
    <result xsi:type="xsd:string">String 1</result>
    <result xsi:type="xsd:string">String 2</result>
    <result xsi:type="xsd:string">String 3</result>
    <result xsi:type="xsd:string">String 4</result>
   </result>
  </getStringArrayResponse>
 </soapenv:Body>

So it seems that WSS4J has a different Array serialization methods. I have the feeling that WSS4J actually does it right by adding the correct array encoding. 

Due to these different array serialization approaches it is currently not possible to sign the SOAP message with WSS4J since G seems to return arrays which lack the appropriate array encoding :-( .

Regards,

Stefan Schmidt



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (GERONIMO-975) Problems with SOAPArrayType

Posted by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-975?page=all ]

Aaron Mulder updated GERONIMO-975:
----------------------------------

    Fix Version: 1.1

> Problems with SOAPArrayType
> ---------------------------
>
>          Key: GERONIMO-975
>          URL: http://issues.apache.org/jira/browse/GERONIMO-975
>      Project: Geronimo
>         Type: Bug
>   Components: webservices
>     Versions: 1.0-M5
>     Reporter: Stefan Schmidt
>      Fix For: 1.1
>  Attachments: WSS4JTest.zip
>
> I am having a number of problems caused by array handling in SOAP. 
> Using sun's jwsdp I generated a simple JAX-RPC Web service which is supposed to return an array of Strings. I used the Java2WSDL approach for a JSE - meaning I generated heavyweight mappings and a wsdl file for my simple WS and deployed it to G. While the WS works in general it shows the following warning:
> 09:21:29,737 WARN  [HeavyweightTypeInfoBuilder] No soap array info for schematype: T=StringArray@http://arrays/java/lang
> This is due to a non-spec conformant wsdl array mapping generated by the jwsdp:
> 	<types>
> 		<schema targetNamespace="http://arrays/java/lang"
> 			xmlns:tns="http://arrays/java/lang"
> 			xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 			xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 			xmlns="http://www.w3.org/2001/XMLSchema">
> 			<complexType name="StringArray">
> 				<sequence>
> 					<element name="value" type="string" nillable="true"
> 						minOccurs="0" maxOccurs="unbounded" />
> 				</sequence>
> 			</complexType>
> 		</schema>
> 	</types>
> This works for this web service which returns the following response (apart from the warning):
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
>    <result xsi:type="xsd:string" xmlns="">String 1</result>
>    <result xsi:type="xsd:string" xmlns="">String 2</result>
>    <result xsi:type="xsd:string" xmlns="">String 3</result>
>    <result xsi:type="xsd:string" xmlns="">String 4</result>
>   </getStringArrayResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> However, when I switch on  WSS4J security the response looks quite different (SOAP body only):
>  <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="id-1197222">
>   <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
>    <result xmlns="" xmlns:ns1="http://arrays/java/lang"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> soapenc:arrayType="ns1:StringArray[4]" xsi:type="soapenc:Array">
>     <result xsi:type="xsd:string">String 1</result>
>     <result xsi:type="xsd:string">String 2</result>
>     <result xsi:type="xsd:string">String 3</result>
>     <result xsi:type="xsd:string">String 4</result>
>    </result>
>   </getStringArrayResponse>
>  </soapenv:Body>
> So it seems that WSS4J has a different Array serialization methods. I have the feeling that WSS4J actually does it right by adding the correct array encoding. 
> Due to these different array serialization approaches it is currently not possible to sign the SOAP message with WSS4J since G seems to return arrays which lack the appropriate array encoding :-( .
> Regards,
> Stefan Schmidt

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (GERONIMO-975) Problems with SOAPArrayType

Posted by "Stefan Schmidt (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-975?page=comments#action_12322610 ] 

Stefan Schmidt commented on GERONIMO-975:
-----------------------------------------

Upon further research I found in the WS-I BasicProfile-1.1 http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#soapenc_Array that the 

<result xmlns="" xmlns:ns1="http://arrays/java/lang" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" soapenc:arrayType="ns1:StringArray[4]" xsi:type="soapenc:Array">  

should not be in there. When the WSS4JHandler uses the following method to access the soap message: message.getSOAPPart().getContent(); this returns the soap message with the above stated line. However this line is not included in the soap response if WSS4J is turned off. Are there actually two different serialization methods used? Why does message.getSOAPPart().getContent(); return a different message than what is actually sent in the final soap response?

> Problems with SOAPArrayType
> ---------------------------
>
>          Key: GERONIMO-975
>          URL: http://issues.apache.org/jira/browse/GERONIMO-975
>      Project: Geronimo
>         Type: Bug
>   Components: webservices
>     Versions: 1.0-M5
>     Reporter: Stefan Schmidt
>  Attachments: WSS4JTest.zip
>
> I am having a number of problems caused by array handling in SOAP. 
> Using sun's jwsdp I generated a simple JAX-RPC Web service which is supposed to return an array of Strings. I used the Java2WSDL approach for a JSE - meaning I generated heavyweight mappings and a wsdl file for my simple WS and deployed it to G. While the WS works in general it shows the following warning:
> 09:21:29,737 WARN  [HeavyweightTypeInfoBuilder] No soap array info for schematype: T=StringArray@http://arrays/java/lang
> This is due to a non-spec conformant wsdl array mapping generated by the jwsdp:
> 	<types>
> 		<schema targetNamespace="http://arrays/java/lang"
> 			xmlns:tns="http://arrays/java/lang"
> 			xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 			xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 			xmlns="http://www.w3.org/2001/XMLSchema">
> 			<complexType name="StringArray">
> 				<sequence>
> 					<element name="value" type="string" nillable="true"
> 						minOccurs="0" maxOccurs="unbounded" />
> 				</sequence>
> 			</complexType>
> 		</schema>
> 	</types>
> This works for this web service which returns the following response (apart from the warning):
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
>    <result xsi:type="xsd:string" xmlns="">String 1</result>
>    <result xsi:type="xsd:string" xmlns="">String 2</result>
>    <result xsi:type="xsd:string" xmlns="">String 3</result>
>    <result xsi:type="xsd:string" xmlns="">String 4</result>
>   </getStringArrayResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> However, when I switch on  WSS4J security the response looks quite different (SOAP body only):
>  <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="id-1197222">
>   <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
>    <result xmlns="" xmlns:ns1="http://arrays/java/lang"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> soapenc:arrayType="ns1:StringArray[4]" xsi:type="soapenc:Array">
>     <result xsi:type="xsd:string">String 1</result>
>     <result xsi:type="xsd:string">String 2</result>
>     <result xsi:type="xsd:string">String 3</result>
>     <result xsi:type="xsd:string">String 4</result>
>    </result>
>   </getStringArrayResponse>
>  </soapenv:Body>
> So it seems that WSS4J has a different Array serialization methods. I have the feeling that WSS4J actually does it right by adding the correct array encoding. 
> Due to these different array serialization approaches it is currently not possible to sign the SOAP message with WSS4J since G seems to return arrays which lack the appropriate array encoding :-( .
> Regards,
> Stefan Schmidt

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (GERONIMO-975) Problems with SOAPArrayType

Posted by "Matt Hogstrom (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-975?page=all ]

Matt Hogstrom updated GERONIMO-975:
-----------------------------------

    Fix Version/s: 1.x
                       (was: 1.2)

> Problems with SOAPArrayType
> ---------------------------
>
>                 Key: GERONIMO-975
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-975
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 1.0-M5
>            Reporter: Stefan Schmidt
>             Fix For: 1.x
>
>         Attachments: WSS4JTest.zip
>
>
> I am having a number of problems caused by array handling in SOAP. 
> Using sun's jwsdp I generated a simple JAX-RPC Web service which is supposed to return an array of Strings. I used the Java2WSDL approach for a JSE - meaning I generated heavyweight mappings and a wsdl file for my simple WS and deployed it to G. While the WS works in general it shows the following warning:
> 09:21:29,737 WARN  [HeavyweightTypeInfoBuilder] No soap array info for schematype: T=StringArray@http://arrays/java/lang
> This is due to a non-spec conformant wsdl array mapping generated by the jwsdp:
> 	<types>
> 		<schema targetNamespace="http://arrays/java/lang"
> 			xmlns:tns="http://arrays/java/lang"
> 			xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 			xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 			xmlns="http://www.w3.org/2001/XMLSchema">
> 			<complexType name="StringArray">
> 				<sequence>
> 					<element name="value" type="string" nillable="true"
> 						minOccurs="0" maxOccurs="unbounded" />
> 				</sequence>
> 			</complexType>
> 		</schema>
> 	</types>
> This works for this web service which returns the following response (apart from the warning):
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
>    <result xsi:type="xsd:string" xmlns="">String 1</result>
>    <result xsi:type="xsd:string" xmlns="">String 2</result>
>    <result xsi:type="xsd:string" xmlns="">String 3</result>
>    <result xsi:type="xsd:string" xmlns="">String 4</result>
>   </getStringArrayResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> However, when I switch on  WSS4J security the response looks quite different (SOAP body only):
>  <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="id-1197222">
>   <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
>    <result xmlns="" xmlns:ns1="http://arrays/java/lang"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> soapenc:arrayType="ns1:StringArray[4]" xsi:type="soapenc:Array">
>     <result xsi:type="xsd:string">String 1</result>
>     <result xsi:type="xsd:string">String 2</result>
>     <result xsi:type="xsd:string">String 3</result>
>     <result xsi:type="xsd:string">String 4</result>
>    </result>
>   </getStringArrayResponse>
>  </soapenv:Body>
> So it seems that WSS4J has a different Array serialization methods. I have the feeling that WSS4J actually does it right by adding the correct array encoding. 
> Due to these different array serialization approaches it is currently not possible to sign the SOAP message with WSS4J since G seems to return arrays which lack the appropriate array encoding :-( .
> Regards,
> Stefan Schmidt

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (GERONIMO-975) Problems with SOAPArrayType

Posted by "Stefan Schmidt (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-975?page=all ]

Stefan Schmidt updated GERONIMO-975:
------------------------------------

    Attachment: WSS4JTest.zip

Attaching Ant-based project for testing.

Change paths to G and Axis in the build.xml

There is a JAX-RPC server-side to be deployed to G as a war file: ant deploy-war
There is a Axis client-side which requires a BouncyCastle and Xerces in the classpath. ant tcpmon (start TCP monitor); ant start-J2SEClient (run the Axis client)


> Problems with SOAPArrayType
> ---------------------------
>
>          Key: GERONIMO-975
>          URL: http://issues.apache.org/jira/browse/GERONIMO-975
>      Project: Geronimo
>         Type: Bug
>   Components: webservices
>     Versions: 1.0-M5
>     Reporter: Stefan Schmidt
>  Attachments: WSS4JTest.zip
>
> I am having a number of problems caused by array handling in SOAP. 
> Using sun's jwsdp I generated a simple JAX-RPC Web service which is supposed to return an array of Strings. I used the Java2WSDL approach for a JSE - meaning I generated heavyweight mappings and a wsdl file for my simple WS and deployed it to G. While the WS works in general it shows the following warning:
> 09:21:29,737 WARN  [HeavyweightTypeInfoBuilder] No soap array info for schematype: T=StringArray@http://arrays/java/lang
> This is due to a non-spec conformant wsdl array mapping generated by the jwsdp:
> 	<types>
> 		<schema targetNamespace="http://arrays/java/lang"
> 			xmlns:tns="http://arrays/java/lang"
> 			xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
> 			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 			xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 			xmlns="http://www.w3.org/2001/XMLSchema">
> 			<complexType name="StringArray">
> 				<sequence>
> 					<element name="value" type="string" nillable="true"
> 						minOccurs="0" maxOccurs="unbounded" />
> 				</sequence>
> 			</complexType>
> 		</schema>
> 	</types>
> This works for this web service which returns the following response (apart from the warning):
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
>    <result xsi:type="xsd:string" xmlns="">String 1</result>
>    <result xsi:type="xsd:string" xmlns="">String 2</result>
>    <result xsi:type="xsd:string" xmlns="">String 3</result>
>    <result xsi:type="xsd:string" xmlns="">String 4</result>
>   </getStringArrayResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> However, when I switch on  WSS4J security the response looks quite different (SOAP body only):
>  <soapenv:Body
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> wsu:Id="id-1197222">
>   <getStringArrayResponse xmlns="http://stsmedia.wss4j.test">
>    <result xmlns="" xmlns:ns1="http://arrays/java/lang"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> soapenc:arrayType="ns1:StringArray[4]" xsi:type="soapenc:Array">
>     <result xsi:type="xsd:string">String 1</result>
>     <result xsi:type="xsd:string">String 2</result>
>     <result xsi:type="xsd:string">String 3</result>
>     <result xsi:type="xsd:string">String 4</result>
>    </result>
>   </getStringArrayResponse>
>  </soapenv:Body>
> So it seems that WSS4J has a different Array serialization methods. I have the feeling that WSS4J actually does it right by adding the correct array encoding. 
> Due to these different array serialization approaches it is currently not possible to sign the SOAP message with WSS4J since G seems to return arrays which lack the appropriate array encoding :-( .
> Regards,
> Stefan Schmidt

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira