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 "Sanders, Corey" <Co...@stercomm.com> on 2002/02/05 21:06:08 UTC

Error parsing response envelope on Linux, but not windows 2000.

I am experiencing wierd behavior using the SOAP-2_2 API. Using the code
fragment attached below, I can make a successful call from my SOAP client on
a Windows 2000 machine into an Apache SOAP 2.1 service running on JRun. But,
using the _exact_ same code, against the same service, but from my Redhat
7.2 machine, I am getting the attached exception. I have verified that the
classpaths and jars are the same on both machines. The client JVM is the
same - JDK1.3.1_01. Both clients are running under Weblogic 6.1.

Stepping through the SOAP source in my debugger, I can see why the error is
occuring. While processing the response envelope (attached below), the API
is unable to locate a namespaceURI for the "xsd" namespace. But the xsd
namespace is defined  in the Envelope tag! Besides that, I cannot see why
the behavior would be different between the two platforms. And I am pretty
confident there is a platform issue because I have been able to duplicate
the problem on two different Linux machines and unable to duplicate the
problem on two different Windows 2000 machines.


---------- 8< CUT - Exception - CUT 8< ----------

project.exception.RegistrationException: Unexpected exception caught in
call.[Stack Trace:] [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to
resolve namespace URI for 'xsd'.;
targetException=java.lang.IllegalArgumentException: Unable to resolve
namespace URI for 'xsd'.]
	at org.apache.soap.rpc.Call.invoke(Call.java:244)
	at
project.memberadmin.RegistrationAPI.getUserInfo(RegistrationAPI.java:212)
	at jsp_servlet.__GetUserInfo._jspService(__GetUserInfo.java:133)
	at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
	at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
	at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
	at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2456)
	at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2039)
	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

---------- 8< CUT - Response Envelope - CUT 8< ----------

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/1999/XMLSchema">
	<SOAP-ENV:Body>
		<ns1:getUserInfoResponse
			xmlns:ns1="urn:GetUserInfoManager"
	
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
			<return xsi:type="xsd:string">blah, blah,
blah</return>
		</ns1:getUserInfoResponse>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


---------- 8< CUT - Code Fragment - CUT 8< ----------

call = new Call();

callProvider = getCallProvider(METHOD_GET_USER_INFO);

call.setTargetObjectURI(callProvider);
call.setMethodName(METHOD_GET_USER_INFO);
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
params.addElement(new Parameter(PARAM_CUSTOMER_ID, String.class,
_customerId, null));
params.addElement(new Parameter(PARAM_CONTACT_ID, String.class, _contactId,
null));
call.setParams(params);

Response resp = call.invoke(new URL(providerURL), "");
if( resp.generatedFault() )
{
	Fault fault = resp.getFault();
	throw new RegistrationException("SOAP Exception in call: (" +
		fault.getFaultCode() + ") " + fault.getFaultString() );
} else
{
	result = resp.getReturnValue();
}

--

Corey Sanders
Global Development
Sterling Commerce
614-659-6860