SOAPGateway - IllegalArgumentException

I am using the SOAPGateway to call a web service. The web service was built from a Natural subprogram using EntireX XML Wrapper and the assist function of Mediator studio was used to build the SagSoapGateway step… Everything worked fine on my development desktop PC, but when deployed on a laptop an IllegalArgumentException is thrown by Mediator. I have tried regenerating and redeploying all artefacts on the laptop (idl, xmm, wsdl) but still get the error.

Can anybody advise on what is causing this problem and how to solve it?

Thanks in advance,
David Sanders

Error reported in DefaultComponentFactory.xbd.log:


slf5s.start]25 Nov 2005 09:39:04,937[slf5s.DATE]Thread-4[slf5s.THREAD]ERROR[slf5s.PRIORITY]xbd[slf5s.CATEGORY]- SagSequencer - 1bf7b23~107c6c7f4f0~~7fe7 - SEQUENCER ERROR: sequence "http://localhost:8080/MMA-XBD/XBDTestSequence.xml", line 17, <step>: invalid QName local part[slf5s.MESSAGE]
java.lang.IllegalArgumentException: invalid QName local part
	at javax.xml.namespace.QName.<init>(QName.java:75)
	at javax.xml.namespace.QName.<init>(QName.java:60)
	at org.apache.axis.message.PrefixedQName.<init>(PrefixedQName.java:30)
	at org.apache.axis.message.MessageElement.copyNode(MessageElement.java:2044)
	at org.apache.axis.message.MessageElement.copyNode(MessageElement.java:1997)
	at org.apache.axis.message.MessageElement.<init>(MessageElement.java:195)
	at org.apache.axis.message.SOAPBodyElement.<init>(SOAPBodyElement.java:70)
	at com.softwareag.xbridge.soapgateway.SoapGatewayImpl.prepareRPCCall(DashOB6501:950)
	at com.softwareag.xbridge.soapgateway.SoapGatewayImpl.modify(DashOB6501:690)
	at com.softwareag.xbridge.infrastructure.y.modify(DashOB6501:56)
	at com.softwareag.xbridge.sequencer.KeywordSTEP.execute(DashOB6501:233)
	at com.softwareag.xbridge.sequencer.SequencerImpl.execute(DashOB6501:1081)
	at com.softwareag.xbridge.sequencer.SequencerImpl.dispatch(DashOB6501:753)
	at com.softwareag.xbridge.infrastructure.ac.perform(DashOB6501:278)
	at com.softwareag.xbridge.util.WorkerThread.run(DashOB6501:459)

SagSoapGatewayStep in the Mediator sequence looks like this:


<step component="SagSoapGateway" 
	xbd.soap.arg0.DateFormatRequest="//DateFormatType" 
	xbd.soap.handlefault="false" 
	xbd.soap.operation="{{http://www.mma-insurance.co.uk/webservices}}WS0001N" 
	xbd.soap.port.qn="{{http://namespace.softwareag.com/entirex/xml/mapping}}XBD-WSPort" 
	xbd.soap.res0.DateTimeResponse="//Response" 
	xbd.soap.service.qn="{{http://namespace.softwareag.com/entirex/xml/mapping}}xbd-ws" 
	xbd.soap.session="false" xbd.soap.style="rpc" 
	xbd.soap.wsdl.url="file:/C:/Apache/jakarta-tomcat-4.1.29/webapps/entirex/XBD-WS.wsdl" 
	xbd.zid="N400002"/>

The wsdl file:


<?xml version="1.0" encoding="utf-8"?>
<!-- Generated Nov 25, 2005 9:34:44 AM by Software AG SOAP Toolkit Wizard, Version 7.2.1.0 Build: 2004-09-14 12:44 -->
<definitions name="XBD-WS" targetNamespace="http://namespace.softwareag.com/entirex/xml/mapping" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://namespace.softwareag.com/entirex/xml/mapping">
	<types>
		<schema targetNamespace="http://namespace.softwareag.com/entirex/xml/mapping" xmlns="http://www.w3.org/2001/XMLSchema">
			<xsd:complexType name="DateTimeResponse">
				<xsd:sequence>
					<xsd:element name="Date" type="xsd:string"/>
					<xsd:element name="Time" type="xsd:decimal"/>
					<xsd:element name="Timezone" type="xsd:string"/>
				</xsd:sequence>
			</xsd:complexType>
		</schema>
	</types>
	<message name="WS0001N">
		<part name="DateFormatRequest" type="xsd:string"/>
	</message>
	<message name="WS0001NResponse">
		<part name="DateTimeResponse" type="tns:DateTimeResponse"/>
	</message>
	<portType name="XBD-WSPort">
		<operation name="WS0001N">
			<input message="tns:WS0001N"/>
			<output message="tns:WS0001NResponse"/>
		</operation>
	</portType>
	<binding name="XBD-WSSoapBinding" type="tns:XBD-WSPort">
		<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="WS0001N">
			<soap:operation soapAction="WS0001N"/>
			<input>
				<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.mma-insurance.co.uk/webservices"/>
			</input>
			<output>
				<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.mma-insurance.co.uk/webservices"/>
			</output>
		</operation>
	</binding>
	<service name="xbd-ws">
		<port name="XBD-WSPort" binding="tns:XBD-WSSoapBinding">
			<soap:address location="http://localhost:8080/entirex/xmlrt"/>
		</port>
	</service>
</definitions>

Hi David,

The problem is the XPath expression you use for your result. The XPath statement for your result is intended to indicate the location in the current payload where the SOAP response should be placed. This XPath has to be absolute. Your Xpath “//Response” points to any and all nodes in your XML document having the name Response.

Regards,

Hi Matthew,

I changed the XPATHs for the input and response arguments to absolute values (TestMessage/Request/DateFormatType and TestMessage/Response respectively) but still got an IllegalArgumentException. I used the XPATH test dialog to verify the XPATHs are correct.

Here is a copy of the current message taken from the Mediator logs:


<TestMessage><Request><DateFormatType>DATD</DateFormatType><Lang>EN</Lang></Request><Response/></TestMessage>

I think the problem is environmental. The sequences work fine as they are on my desktop PC but not on the laptop. Both PCs have Mediator 7.4.1 deployed. Could I be missing a zap or maybe using a different SAX on the laptop?

David Sanders

Hi David,

How far is the process getting? Is the EXX xmlrt getting the request? I tested this on my system and got the HTTP 500 code I expected so the request was made.

You might have some sort of class conflict in your second system but that is impossible to tell from the errors you are getting. Do you have any other differences between the environments? Additional applications in your Web Container?

Regards,

Hi Matthew,

I don’t believe xmlrt is getting the request. I conducted the following tests:

  1. Changed the port in the wsdl file to use localhost:8081 rather than localhost:8080 in the soap address.
  2. Set tcpTrace to redirect localhost:8081 to localhost:8080.
  3. Restarted Tomcat, Mediator Host Manager and deleted all mediator resources.
  4. Submitted a request to the Mediator sequence.
  5. Examined the http request/response intercepted by tcpTrace.

On my desktop, where the Mediator sequence is working correctly, I can see the request and response as expected.

On the laptop, where the Mediator sequence is not working, I do not see anything in tcpTrace.

Regards,
David Sanders

Hi David,

Sorry for not getting back to you sooner.

I am a little perplexed about your problem. There must be something in your environment which is causing this.

My only suggestion is to check your web server for conflicting versions of the main XML resources used for XPath evaluation and SOAP. The Mediator utilizes the standard Apache packages for this… AXIS, Xalan and Xerces.

To ensure you are loading the classes required for error-free processing you may alter the startup script for your Application server by adding the following JVM parameter:

-Dxbd.custom.classloader=true

This should ensure the ComponentFactory is getting the correct versions of the packages I mentioned.

Regards,