You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by "Lau, Annie" <An...@team.telstra.com> on 2001/04/10 09:37:41 UTC

Namespace and Part element in Message

Hi, has anyone had with problems with namespace and part element in message?

I have used IdooXoap1.1.1 and Apache SOAP2.1 to automatically create a WSDL
from a Java class.  It has a an operation called 'getName' which takes in no
input and returns a String output.

The message name is as follows:

	<message name="getName" />
	<message name="getNameResponse"> 
		<part element="tns:el0" name="result" /> 
	</message>
------------

The tns namespace in the definition is as follows:
	
	xmlns:tns="http://www.somesite.com">

-------------

And the <types> with the <schema> tag is below:
	<types xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
 		-<schema targetNamespace="http://www.somesite.com"
                 xmlns="http://www.w3.org/2000/10/XMLSchema">
                 <element name="el0" nullable="true" type="xsd:string" /> 
             </schema>
      </types>  

-------------

So the getNameResponse should know that its return element "e10" is
"string", as defined in the "tns" namespace in the schema.  

However, I'm getting an IllegalArgumentException referring to a Mime
attachement with label "#id0" when we're extracting the envelop from the
Response:

"IllegalArgument:Attachment tag "el0" refers to a Mime attachment with label
"#id0" which could not be found.
java.lang.IllegalArgumentException: Attachment tag "el0" refers to a Mime
attachment with label "#id0" which could not be found.
        at
org.apache.soap.encoding.soapenc.MimePartSerializer.unmarshall(MimePartSeria
lizer.java:191)
        at
org.apache.soap.encoding.soapenc.ParameterSerializer.unmarshall(ParameterSer
ializer.java:122)
        at
org.apache.soap.util.xml.XMLJavaMappingRegistry.unmarshall(XMLJavaMappingReg
istry.java:235)
        at org.apache.soap.rpc.RPCMessage.unmarshall(RPCMessage.java:422)
        at
org.apache.soap.rpc.RPCMessage.extractFromEnvelope(RPCMessage.java:197)
        at
org.apache.soap.rpc.Response.extractFromEnvelope(Response.java:142)"

Does anyone know what's going on?  

Any help is greatly appreciated!

Thanks, 
Annie        

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org