I am using XFire 1.2.6 with Java 1.4.2.x.  I am trying to create a client test 
program to test out my new web service.  The client code looks like below.  It 
looks like I am getting an NPE when XFire is trying to write out the 3rd parm 
in my method - which happens to be the first instance of an 'ArrayOfString'.  
 
What do I need to do in order to get the client to be able to use the 
'ArrayOfString' type???
 
ObjectType.writeObject(Object, MessageWriter, MessageContext) line: 182 
AegisBindingProvider.writeParameter(MessagePartInfo, XMLStreamWriter, 
MessageContext, Object) line: 229 ...


public void testDecrypt() 
Client client = new Client(new URL(
http://localhost:8001/centralws/services/Decryption?WSDL
));
String[] keys = new String[] { TEST_KEY };
String[] data = new String[] { "dfadfadfadfadsfadsf" };
String[] dates = new String[] { "dfadfadfadfadsfadsf" };

Object[] results = null;

try {
results = client.invoke("decrypt", new Object[] { USER, PASSWORD, keys, data, 
dates });
} catch (Exception e) {
System.out.println(e);
}

}
 

WSDL
-------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions 
targetNamespace="http://security.service.server.infrastructure.portfolio.jda.com";
 xmlns:tns="http://security.service.server.infrastructure.portfolio.jda.com"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:ns1="http://lang.java"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:ns3="http://security.base.infrastructure.portfolio.jda.com"; 
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"; 
xmlns:ns2="http://rmi.java"; 
xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
<wsdl:types>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://security.service.server.infrastructure.portfolio.jda.com";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<xsd:complexType name="ArrayOfString">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" 
type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="decrypt">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="user" nillable="false" 
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="password" nillable="false" 
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="keys" nillable="false" 
type="tns:ArrayOfString"/>
<xsd:element maxOccurs="1" minOccurs="1" name="data" nillable="false" 
type="tns:ArrayOfString"/>
<xsd:element maxOccurs="1" minOccurs="1" name="dates" nillable="false" 
type="tns:ArrayOfString"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="decryptResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" 
type="tns:ArrayOfString"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="RemoteException" type="ns2:RemoteException"/>
<xsd:element name="DecryptionException" type="ns3:DecryptionException"/>
</xsd:schema>

<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://rmi.java"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<xsd:complexType name="RemoteException">

<xsd:sequence>
<xsd:element minOccurs="0" name="cause" nillable="true" type="ns1:Throwable"/>
<xsd:element minOccurs="0" name="message" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>

<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://lang.java"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<xsd:complexType name="Throwable"/>
</xsd:schema>

<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace="http://security.base.infrastructure.portfolio.jda.com"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<xsd:complexType name="DecryptionException">
<xsd:sequence>
<xsd:element minOccurs="0" name="reasonCode" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>

</xsd:schema>

</wsdl:types>
<wsdl:message name="DecryptionException">
<wsdl:part name="DecryptionException" element="tns:DecryptionException">
</wsdl:part>
</wsdl:message>
<wsdl:message name="RemoteException">
<wsdl:part name="RemoteException" element="tns:RemoteException">
</wsdl:part>

</wsdl:message>
<wsdl:message name="decryptResponse">
<wsdl:part name="parameters" element="tns:decryptResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="decryptRequest">
<wsdl:part name="parameters" element="tns:decrypt">
</wsdl:part>
</wsdl:message>

<wsdl:portType name="DecryptionPortType">
<wsdl:operation name="decrypt">
<wsdl:input name="decryptRequest" message="tns:decryptRequest">
</wsdl:input>
<wsdl:output name="decryptResponse" message="tns:decryptResponse">
</wsdl:output>
<wsdl:fault name="RemoteException" message="tns:RemoteException">
</wsdl:fault>
<wsdl:fault name="DecryptionException" message="tns:DecryptionException">

</wsdl:fault>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="DecryptionHttpBinding" type="tns:DecryptionPortType">
<wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="decrypt">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="decryptRequest">
<wsdlsoap:body use="literal"/>

</wsdl:input>
<wsdl:output name="decryptResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="RemoteException">
<wsdlsoap:fault name="RemoteException" use="literal"/>
</wsdl:fault>
<wsdl:fault name="DecryptionException">
<wsdlsoap:fault name="DecryptionException" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Decryption">
<wsdl:port name="DecryptionHttpPort" binding="tns:DecryptionHttpBinding">
<wsdlsoap:address 
location="http://localhost:8001/centralws/services/Decryption"/>
</wsdl:port>
</wsdl:service>

_________________________________________________________________
Messenger Café — open for fun 24/7. Hot games, cool activities served daily. 
Visit now.
http://cafemessenger.com?ocid=TXT_TAGLM_AugWLtagline

Reply via email to