Just adding more information about the problem...
 
Manualy creating the Soap envelope and posting it to the service:
 
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:bean="http://strongauth.zionsbank.com/webservices/beans";>
   <soapenv:Header/>
   <soapenv:Body>
      <bean:ValidatePasswordRequest>
         <!--Zero or more repetitions:-->
         <credentials>
            <type>CustomerUserId</type>
            <value>user_id</value>
         </credentials>
         <credentials>
            <type>CustomerPassword</type>
            <value>password</value>
         </credentials>
      </bean:ValidatePasswordRequest>
   </soapenv:Body>
</soapenv:Envelope>
 
Response:
 
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Client</faultcode>
 
<faultstring>org.apache.xmlbeans.impl.values.XmlComplexContentImpl</faul
tstring>
         <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>
 
Thanks,
 
Matt Bailey
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
 

________________________________

From: Matthew Bailey 
Sent: Wednesday, August 01, 2007 3:54 PM
To: '[email protected]'
Subject: RE: java.lang.NumberFormatException


I've regenerated my client/service using Axis2 1.3-RC2 and I'm getting
different errors but still having problems.
 
This seems to work just fine if I use the ADB binding, but some of our
wsdls are too complex for ADB and we are trying to be consistant in our
binding.
 
On the client side, I get the following error now:
 
     [java] stub.validatePassword(reqDoc);
     [java] org.apache.axis2.AxisFault:
org.apache.xmlbeans.impl.values.XmlComplexContentImpl
     [java]     at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
:486)
     [java]     at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out
InAxisOperation.java:343)
     [java]     at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:387)
     [java]     at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:211)
     [java]     at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)
     [java]     at
samples.quickstart.service.xmlbeans.IntegrationPortTypeImplServiceStub.v
alidatePasswordIntegrationPortTypeImplServiceStub.java:169)
     [java]     at
samples.quickstart.clients.XMLBEANSClient.main(XMLBEANSClient.java:53)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:324)
     [java]     at
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
     [java]     at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
     [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:747)
     [java]     at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:201)
 
     [java]     at
org.apache.tools.ant.taskdefs.Java.execute(Java.java:104)
     [java]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:324)
     [java]     at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:1
05)
     [java]     at org.apache.tools.ant.Task.perform(Task.java:348)
     [java]     at org.apache.tools.ant.Target.execute(Target.java:357)
     [java]     at
org.apache.tools.ant.Target.performTasks(Target.java:385)
     [java]     at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
     [java]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1298)
 
     [java]     at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:41)
     [java]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
     [java]     at org.apache.tools.ant.Main.runBuild(Main.java:698)
     [java]     at org.apache.tools.ant.Main.startAnt(Main.java:199)
     [java]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
     [java]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
     [java]
     [java]
     [java]
     [java]
 
Client Code:
---------------------------------
IntegrationPortTypeImplServiceStub stub =
     new IntegrationPortTypeImplServiceStub
 
("http://10.236.6.242:7001/axis2/services/IntegrationPortTypeImplService
");
 
//("http://10.236.6.242:7001/providerpay/services/IntegrationPortTypeImp
lService");
    ValidatePasswordRequestDocument reqDoc =
ValidatePasswordRequestDocument.Factory.newInstance();
    com.zionsbank.strongauth.webservices.beans.RequestType requestType =
reqDoc.addNewValidatePasswordRequest();
 
    Credential credential_CUSTOMER_USER_ID =
requestType.addNewCredentials();
 
credential_CUSTOMER_USER_ID.setType(CredentialType.CUSTOMER_USER_ID);
    credential_CUSTOMER_USER_ID.setValue("user_id");
 
    Credential credential_CUSTOMER_PASSWORD =
requestType.addNewCredentials();
 
credential_CUSTOMER_PASSWORD.setType(CredentialType.CUSTOMER_PASSWORD);
    credential_CUSTOMER_PASSWORD.setValue("password");
 
    System.err.println("\n\nrequestType : \n"+requestType+"\n\n");
 
    ValidatePasswordResponseDocument resDoc =
stub.validatePassword(reqDoc);
---------------------------------
 
 
 
WSDL:
IntegrationServices.wsdl
---------------------------------
<?xml version='1.0'  encoding='UTF-8' ?>
<wsdl:definitions
targetNamespace="http://strongauth.zionsbank.com/webservices";  
 xmlns:defs="http://strongauth.zionsbank.com/webservices"; 
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
 xmlns:types="http://strongauth.zionsbank.com/webservices/beans"; 
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; >
 <wsdl:types>
  <xsd:schema>
   <xsd:import
namespace="http://strongauth.zionsbank.com/webservices/beans";
schemaLocation="IntegrationTypes.xsd"/>
  </xsd:schema>
 </wsdl:types>
 
 <wsdl:message name="ValidatePasswordRequest">
  <wsdl:part element="types:ValidatePasswordRequest"
name="validatePasswordRequestMessage"/>
 </wsdl:message>
 
 <wsdl:message name="ValidatePasswordResponse">
  <wsdl:part element="types:ValidatePasswordResponse"
name="validatePasswordResponseMessage"/>
 </wsdl:message>
 
 <wsdl:portType name="IntegrationPortType">
  
  <wsdl:operation name="validatePassword">
   <wsdl:input message="defs:ValidatePasswordRequest"
name="validatePasswordRequest"/>
   <wsdl:output message="defs:ValidatePasswordResponse"
name="validatePasswordResponse"/>
  </wsdl:operation>
  
 </wsdl:portType>
 
 <wsdl:binding name="IntegrationSoapBinding"
type="defs:IntegrationPortType">
  <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
  
  <wsdl:operation name="validatePassword">
   <soap:operation style="document"
soapAction="http://strongauth.zionsbank.com/webservices/validatePassword
"/>
   <wsdl:input name="validatePasswordRequest">
    <soap:body parts="validatePasswordRequestMessage" use="literal"/>
   </wsdl:input>
   <wsdl:output name="validatePasswordResponse">
    <soap:body parts="validatePasswordResponseMessage" use="literal"/>
   </wsdl:output>
  </wsdl:operation>
 </wsdl:binding>
 
 <wsdl:service name="IntegrationPortTypeImplService">
  <wsdl:port binding="defs:IntegrationSoapBinding"
name="IntegrationPortTypeImplPort">
   <soap:address
location="http://localhost:7001/IntegrationService/IntegrationServices"/
>
  </wsdl:port>
 </wsdl:service>
</wsdl:definitions>
---------------------------
IntegrationTypes.xsd
---------------------------
<?xml version='1.0'  encoding='UTF-8' ?>
<xsd:schema
targetNamespace="http://strongauth.zionsbank.com/webservices/beans"; 
 xmlns="http://strongauth.zionsbank.com/webservices/beans"; 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
 xsi:schemaLocation="http://www.w3.org/2001/XMLSchema";>
 <xsd:include schemaLocation="BaseTypes.xsd"/>
 
 <!-- Types -->
 
 <xsd:simpleType name="FirstName">
  <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>
 
 <xsd:simpleType name="LastName">
  <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>
 
 <xsd:simpleType name="OrganizationName">
  <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>
 
 <xsd:complexType name="RequestType">
  <xsd:sequence>
   <xsd:element name="credentials" type="Credential" minOccurs="0"
maxOccurs="unbounded"/>
  </xsd:sequence>
 </xsd:complexType>
 
 <xsd:simpleType name="UserRole">
  <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>
 
 <xsd:simpleType name="UserStatus">
  <xsd:restriction base="xsd:string">
   <xsd:enumeration value="ACTIVE"/>
   <xsd:enumeration value="DELETED"/>
   <xsd:enumeration value="DISABLED"/>
   <xsd:enumeration value="LOCKED"/>
  </xsd:restriction>
 </xsd:simpleType>
 
 <!-- Elements -->
 
 <xsd:element name="ValidatePasswordRequest" type="RequestType"/> 
 
 <xsd:element name="ValidatePasswordResponse">
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element name="responseCode" type="ResponseCode"/>
    <xsd:element name="message" type="ResponseMessage"/>
    <xsd:element name="credentials" type="Credential" minOccurs="0"
maxOccurs="unbounded"/>
    <xsd:element name="validCredentials" type="IsValidCredentials"/>
    <xsd:element name="userStatus" type="UserStatus"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element> 
 
</xsd:schema>
-----------------------------
BaseType.xsd
-----------------------------
<?xml version='1.0'  encoding='UTF-8' ?>
<xsd:schema
targetNamespace="http://strongauth.zionsbank.com/webservices/beans"; 
 xmlns="http://strongauth.zionsbank.com/webservices/beans"; 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
 xsi:schemaLocation="http://www.w3.org/2001/XMLSchema";>
 
 <xsd:simpleType name="AppId">
  <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>
 
 <xsd:complexType name="Credential">
  <xsd:sequence>
   <xsd:element name="type" type="CredentialType"/>
   <xsd:element name="value" type="xsd:string"/>
  </xsd:sequence>
 </xsd:complexType>
 
 <xsd:simpleType name="CredentialType">
  <xsd:restriction base="xsd:string">
   <xsd:enumeration value="ChallengeId"/>
   <xsd:enumeration value="CustomerPassword"/>
   <xsd:enumeration value="CustomerUserId"/>
   <xsd:enumeration value="NewCustomerPassword"/>
   <xsd:enumeration value="NewCustomerUserId"/>
   <xsd:enumeration value="NewOrganizationId"/>
   <xsd:enumeration value="NewOrganizationPassword"/>
   <xsd:enumeration value="OrganizationId"/>
   <xsd:enumeration value="OrganizationPassword"/>
  </xsd:restriction>
 </xsd:simpleType>
 
 <xsd:simpleType name="DomainId">
  <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>
 
 <xsd:simpleType name="IsValidCredentials">
  <xsd:restriction base="xsd:boolean"/>
 </xsd:simpleType>
 
 <xsd:simpleType name="ResponseCode">
  <xsd:restriction base="xsd:string">
   <xsd:enumeration value="SUCCESS"/>
   <xsd:enumeration value="ERROR"/>
  </xsd:restriction>
 </xsd:simpleType>
 
 <xsd:simpleType name="ResponseMessage">
  <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>
 
</xsd:schema>
 
 
Matt Bailey
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
 

________________________________

From: Matthew Bailey 
Sent: Wednesday, August 01, 2007 1:54 PM
To: [email protected]
Cc: Cary Schofield
Subject: java.lang.NumberFormatException


I've used WSDL2Java to generate a client and server using XMLBeana, when
the client calls the service I get the following error on the server
side:
 
Aug 1, 2007 1:36:03 PM org.apache.axis2.transport.http.AxisServlet
doPost
SEVERE: java.lang.NumberFormatException: 
Aug 1, 2007 1:36:03 PM org.apache.axis2.transport.http.AxisServlet
doPost
INFO: org.apache.axis2.AxisFault: Connection aborted by peer
 
And on the client side I recieve a NullPointerException.
 
When I searched the web for a similar problem, I came across the
following which describes this situation very well.
 
http://marc.info/?l=axis-user&m=115965408111474&w=2
<http://marc.info/?l=axis-user&m=115965408111474&w=2> 
 
The call I'm making to the service is very simple
 
<credentials xmlns="">
  <type>CustomerUserId</type>
  <value>user_id</value>
</credentials>
<credentials xmlns="">
  <type>CustomerPassword</type>
  <value>password</value>
</credentials>
 
But credentials type is a restriction based simple type, so I'm
wondering if this is a bug or if I'm doing something wrong.
 
My client code:
 
ImplServiceStub stub =
     new ImplServiceStub
     ("http://host/axis2/services/ImplService";);
ValidateRequestDocument reqDoc =
ValidateRequestDocument.Factory.newInstance();
    RequestType requestType = reqDoc.addNewValidateRequest();
 
    Credential credential_CUSTOMER_USER_ID =
requestType.addNewCredentials();
 
credential_CUSTOMER_USER_ID.setType(CredentialType.CUSTOMER_USER_ID);//t
his is an enum class within CredentialType
    credential_CUSTOMER_USER_ID.setValue("user_id");
 
    Credential credential_CUSTOMER_PASSWORD =
requestType.addNewCredentials();
 
credential_CUSTOMER_PASSWORD.setType(CredentialType.CUSTOMER_PASSWORD);/
/this is an enum class within CredentialType
    credential_CUSTOMER_PASSWORD.setValue("password");
 
    // Call the service
    ValidateResponseDocument resDoc = stub.validate(reqDoc);
 
If any one has some pointers I'd apreciate it!
 
Thanks,
 
Matt Bailey
[EMAIL PROTECTED]
 

Reply via email to