You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Davanum Srinivas (JIRA)" <ji...@apache.org> on 2006/05/05 05:24:17 UTC

[jira] Commented: (AXIS2-669) Axiom doesn't handle default namespace correctly

    [ http://issues.apache.org/jira/browse/AXIS2-669?page=comments#action_12377945 ] 

Davanum Srinivas commented on AXIS2-669:
----------------------------------------

Raymond,

could u please help write a tiny test case against just AXIOM? then we can move it to WS-COMMONS JIRA.

thanks,
dims

> Axiom doesn't handle default namespace correctly
> ------------------------------------------------
>
>          Key: AXIS2-669
>          URL: http://issues.apache.org/jira/browse/AXIS2-669
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: om
>     Versions: 1.0
>     Reporter: Raymond Feng
>     Priority: Blocker

>
> I have the following WSDL:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> 	xmlns:tns="http://www.example.org/creditscore/doclitwrapped/"
> 	xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CreditScore"
> 	targetNamespace="http://www.example.org/creditscore/doclitwrapped/">
> 	<wsdl:types>
> 		<xsd:schema
> 			targetNamespace="http://www.example.org/creditscore/doclitwrapped/"
> 			xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 			<xsd:element name="getCreditScoreResponse">
> 			<xsd:complexType>
> 				<xsd:sequence>
> 					<xsd:element name="score" type="xsd:int" />
> 				</xsd:sequence>
> 			</xsd:complexType>			
> 			</xsd:element>
> 			<xsd:element name="getCreditScore">
> 			<xsd:complexType>
> 				<xsd:sequence>
> 					<xsd:element name="ssn" type="xsd:string" />
> 					<xsd:element name="firstName" type="xsd:string" />
> 					<xsd:element name="lastName" type="xsd:string" />
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			</xsd:element>
> 		</xsd:schema>
> 	</wsdl:types>
> 	<wsdl:message name="getCreditScoreResponse">
> 		<wsdl:part element="tns:getCreditScoreResponse"
> 			name="getCreditScoreResponse" />
> 	</wsdl:message>
> 	<wsdl:message name="getCreditScoreRequest">
> 		<wsdl:part element="tns:getCreditScore"
> 			name="getCreditScoreRequest" />
> 	</wsdl:message>
> 	<wsdl:portType name="CreditScoreDocLitWrapped">
> 		<wsdl:operation name="getCreditScore">
> 			<wsdl:input message="tns:getCreditScoreRequest" />
> 			<wsdl:output message="tns:getCreditScoreResponse" />
> 		</wsdl:operation>
> 	</wsdl:portType>
> 	<wsdl:binding name="CreditScoreDocLitWrappedSOAP" type="tns:CreditScoreDocLitWrapped">
> 		<soap:binding style="document"
> 			transport="http://schemas.xmlsoap.org/soap/http" />
> 		<wsdl:operation name="getCreditScore">
> 			<soap:operation
> 				soapAction="http://www.example.org/creditscore/doclitwrapped/getCreditScore" />
> 			<wsdl:input>
> 				<soap:body parts="getCreditScoreRequest" use="literal" />
> 			</wsdl:input>
> 			<wsdl:output>
> 				<soap:body parts="getCreditScoreResponse" use="literal" />
> 			</wsdl:output>
> 		</wsdl:operation>
> 	</wsdl:binding>
> 	<wsdl:service name="CreditScore">
> 		<wsdl:port binding="tns:CreditScoreDocLitWrappedSOAP"
> 			name="CreditScoreDocLitWrappedSOAP">
> 			<soap:address location="http://localhost:8080/CreditScoreService/services/CreditScoreDocLitWrappedSOAP"/>
> 		</wsdl:port>
> 	</wsdl:service>
> </wsdl:definitions>
> My client sends the following SOAP request to the Tomcat server running Axis 1.3.
> <?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header/>
> <soapenv:Body>
> <doclitwrapped:getCreditScore xmlns:doclitwrapped="http://www.example.org/creditscore/doclitwrapped/">
>   <ssn>111-22-3333</ssn>
>   <firstName>John</firstName>
>   <lastName>Smith</lastName>
> </doclitwrapped:getCreditScore>
> </soapenv:Body>
> </soapenv:Envelope>
> The client receives the following SOAP response (dumped from TCP/IP monitor).
> <?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>
> <getCreditScoreResponse xmlns="http://www.example.org/creditscore/doclitwrapped/">
> <score xmlns="">750</score>
> </getCreditScoreResponse>
> </soapenv:Body>
> </soapenv:Envelope>
> Axiom creates an OMElement for the body part as dumped below.
> <getCreditScoreResponse xmlns="http://www.example.org/creditscore/doclitwrapped/"><score>750</score></getCreditScoreResponse>
> Please note xmlns="" is missing for the score element (the XSD element form is unqualified) and the XML is not conforming to the XSD.

-- 
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