axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Celinio.Fernan...@linedata.com
Subject Re: [Axis 1.4] Nothing happens when I run the web services
Date Fri, 18 May 2007 13:55:58 GMT
Hi, this is the java source for the main class and the generated WSDL 
file. Do you have any idea ? Thanks

public class CRMS7_SOAP_IDENTIFICATION {
 
    public IdentificationRetour recupererInfos(String login, String 
motDePasse, String codeTccp){ 
 
        IdentificationRetour idRetour = null;
 
        DetailsInformations detInfService = new DetailsInformations();
        detInfService.setLogin(login); 
        detInfService.setMotDePasse(motDePasse);
        detInfService.setTccp(codeTccp);
 
        try {
                detInfService.doService();
                }
                catch (ExceptionTechnique e1) {
                        //return new Adresse(KO, e1.getMessage());
                }
                catch (ExceptionFonctionnelle e2) {
                        //return new Adresse(KO, e2.getMessage());
                } 
 
        return new IdentificationRetour(detInfService.getCodeRetour(), 
detInfService.getCivilite(), detInfService.getLbNomPrenom(),
                        detInfService.getFlgNpai(), 
detInfService.getTypeOpposition(), detInfService.getRibPrel(), 
detInfService.getRibRbt(),
                        detInfService.getFlgChgMp(), 
detInfService.getFlgCdtGen(), detInfService.getIdSiebel(), 
detInfService.getFlgAutoRemb(),
                        detInfService.getTabEntrepriseIdent());   
    } 
}

WSDL file:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="identif" xmlns:apachesoap=
"http://xml.apache.org/xml-soap" xmlns:impl="identif" xmlns:intf="identif" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1=
"http://bean.identification.soap.noyau.tc.noee.lds.com" xmlns:wsdl=
"http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap=
"http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd=
"http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
 <wsdl:types>
  <schema targetNamespace=
"http://bean.identification.soap.noyau.tc.noee.lds.com" xmlns=
"http://www.w3.org/2001/XMLSchema">
   <import namespace="identif"/>
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="EntrepriseIdent">
    <sequence>
     <element name="autorRbtEntrep" nillable="true" type="xsd:string"/>
     <element name="flagEntrepPrincipale" nillable="true" type=
"xsd:string"/>
     <element name="libelleEntrep" nillable="true" type="xsd:string"/>
     <element name="modeRetour" nillable="true" type="xsd:string"/>
     <element name="statutEntrep" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="IdentificationRetour">
    <sequence>
     <element name="FCivilite" nillable="true" type="xsd:string"/>
     <element name="FCodeRetour" nillable="true" type="xsd:string"/>
     <element name="FFlgAutoRemb" nillable="true" type="xsd:string"/>
     <element name="FFlgCdtGen" nillable="true" type="xsd:string"/>
     <element name="FFlgChgMp" type="xsd:boolean"/>
     <element name="FFlgNpai" nillable="true" type="xsd:string"/>
     <element name="FIdSiebel" nillable="true" type="xsd:string"/>
     <element name="FLbNomPrenom" nillable="true" type="xsd:string"/>
     <element name="FRibPrel" nillable="true" type="xsd:string"/>
     <element name="FRibRbt" nillable="true" type="xsd:string"/>
     <element name="FTypeOpposition" nillable="true" type="xsd:string"/>
     <element name="tabEntrepriseIdent" nillable="true" type=
"impl:ArrayOf_tns1_EntrepriseIdent"/>
    </sequence>
   </complexType>
  </schema>
  <schema targetNamespace="identif" xmlns=
"http://www.w3.org/2001/XMLSchema">
   <import namespace=
"http://bean.identification.soap.noyau.tc.noee.lds.com"/>
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="ArrayOf_tns1_EntrepriseIdent">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType=
"tns1:EntrepriseIdent[]"/>
     </restriction>
    </complexContent>
   </complexType>
  </schema>
 </wsdl:types>

   <wsdl:message name="recupererInfosRequest">

      <wsdl:part name="login" type="xsd:string"/>

      <wsdl:part name="motDePasse" type="xsd:string"/>

      <wsdl:part name="codeTccp" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="recupererInfosResponse">

      <wsdl:part name="recupererInfosReturn" type=
"tns1:IdentificationRetour"/>

   </wsdl:message>

   <wsdl:portType name="CRMS7_SOAP_IDENTIFICATION">

      <wsdl:operation name="recupererInfos" parameterOrder="login 
motDePasse codeTccp">

         <wsdl:input message="impl:recupererInfosRequest" name=
"recupererInfosRequest"/>

         <wsdl:output message="impl:recupererInfosResponse" name=
"recupererInfosResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="identificationSoapBinding" type=
"impl:CRMS7_SOAP_IDENTIFICATION">

      <wsdlsoap:binding style="rpc" transport=
"http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="recupererInfos">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="recupererInfosRequest">

            <wsdlsoap:body encodingStyle=
"http://schemas.xmlsoap.org/soap/encoding/" namespace="identif" use=
"encoded"/>

         </wsdl:input>

         <wsdl:output name="recupererInfosResponse">

            <wsdlsoap:body encodingStyle=
"http://schemas.xmlsoap.org/soap/encoding/" namespace="identif" use=
"encoded"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="CRMS7_SOAP_IDENTIFICATIONService">

      <wsdl:port binding="impl:identificationSoapBinding" name=
"identification">

         <wsdlsoap:address location=
"http://localhost:9000/noeews/services/identification"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

In server-config.wsdd, I added this :
<service name="identification" provider="java:RPC" style="rpc" use=
"encoded">
      <parameter name="wsdlTargetNamespace" value="identif"/>
      <parameter name="wsdlServiceElement" value=
"CRMS7_SOAP_IDENTIFICATIONService"/>
      <parameter name="schemaUnqualified" value=
"http://bean.identification.soap.noyau.tc.noee.lds.com,identif"/>
      <parameter name="wsdlServicePort" value="identification"/>
      <parameter name="className" value=
"com.lds.noee.tc.noyau.soap.identif.IdentificationSoapBindingImpl"/>
      <parameter name="wsdlPortType" value="CRMS7_SOAP_IDENTIFICATION"/>
      <parameter name="typeMappingVersion" value="1.2"/>
      <operation name="recupererInfos" qname="operNS:recupererInfos" 
xmlns:operNS="identif" returnQName="recupererInfosReturn" returnType=
"rtns:IdentificationRetour" xmlns:rtns=
"http://bean.identification.soap.noyau.tc.noee.lds.com" soapAction="" >
        <parameter qname="login" type="tns:string" xmlns:tns=
"http://www.w3.org/2001/XMLSchema"/>
        <parameter qname="motDePasse" type="tns:string" xmlns:tns=
"http://www.w3.org/2001/XMLSchema"/>
        <parameter qname="codeTccp" type="tns:string" xmlns:tns=
"http://www.w3.org/2001/XMLSchema"/>
      </operation>
      <parameter name="allowedMethods" value="recupererInfos"/>

      <typeMapping
        xmlns:ns="http://bean.identification.soap.noyau.tc.noee.lds.com"
        qname="ns:IdentificationRetour"
        type=
"java:com.lds.noee.tc.noyau.soap.identification.bean.IdentificationRetour"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer=
"org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />
      <typeMapping
        xmlns:ns="http://bean.identification.soap.noyau.tc.noee.lds.com"
        qname="ns:EntrepriseIdent"
        type=
"java:com.lds.noee.tc.noyau.soap.identification.bean.EntrepriseIdent"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer=
"org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />
      <arrayMapping
        xmlns:ns="identif"
        qname="ns:ArrayOf_tns1_EntrepriseIdent"
        type=
"java:com.lds.noee.tc.noyau.soap.identification.bean.EntrepriseIdent[]"
        innerType="cmp-ns:EntrepriseIdent" xmlns:cmp-ns=
"http://bean.identification.soap.noyau.tc.noee.lds.com"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />
  </service>

And when I call the web service (using the URL: 
http://localhost:9000/noeews/services/identification?method=recupererInfos&login=toto&motDePasse=titi&codeTccp=123456),

I get this SOAP Response :
  <?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>
- <recupererInfosResponse soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
  <recupererInfosReturn xsi:type="ns1:IdentificationRetour" xsi:nil="true" 
xmlns:ns1="http://bean.identification.soap.noyau.tc.noee.lds.com" /> 
  </recupererInfosResponse>
  </soapenv:Body>
  </soapenv:Envelope>

any idea / suggestion / help ?
Thanks





"Martin Gainty" <mgainty@hotmail.com> 
18/05/2007 15:09
Veuillez répondre à
axis-user@ws.apache.org


A
<axis-user@ws.apache.org>
cc

Objet
Re: [Axis 1.4] Nothing happens when I run the web services






Difficult to answer without seeing javasource and generated wsdl
 
please display the java source file
please display the generated wsdl

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please 
notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.
----- Original Message ----- 
From: Celinio.Fernandes@linedatacom 
To: axis-user@ws.apache.org 
Sent: Friday, May 18, 2007 8:14 AM
Subject: [Axis 1.4] Nothing happens when I run the web services


Hi, 
I am new to web services. 
I created a few java classes, and I want to make a web service out of 
them. With Axis 1.4, integrated into the Jonas server. 

So I generated the WSDL using a little ant script that i wrote : 
    <target name="generate-wsdl"> 
        <axis-java2wsdl 
                 classname=
"com.lds.noee.tc.noyau.soap.CRMS7_SOAP_IDENTIFICATION" 
                 namespace="identif" 
                 location="
http://localhost:9000/axis/services/identification" 
                 output=
"C:\NOEE\workspaces\wsprojet\JAVA\NOEEWS\WebContent\wsdl\identification.wsdl"
> 
                 <classpath path="C:\NOEE\eclipse\wsprojet"/> 
        </axis-java2wsdl> 
    </target> 

And then I generated the deploy.wsdd file, and manually put the content in 
the server-config.wsdd file. 
         <target name="generate-service-stub"> 
                <axis-wsdl2java 
                        verbose="true" 
                    serverside="true" 
                        output="${repertoireSortie}" 
                    url=
"C:\NOEE\workspaces\wsprojet\JAVA\NOEEWS\WebContent\wsdl\identification.wsdl"
>         
                    <mapping  namespace="identif" 
                                package=
"com.lds.noee.tc.noyau.soap.identif"/>             
                </axis-wsdl2java> 
            </target> 

When I try to run the web service locally: 
http://localhost:9000/noeews/services/identification?method=recupererInfos&login=toto&motDePasse=titi&codeTccp=123456



I get this message immediately, as if nothing happens : 
<?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> 
- <recupererInfosResponse soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"> 
  <recupererInfosReturn xsi:type="ns1:IdentificationRetour" xsi:nil="true" 
xmlns:ns1="http://bean.identification.soap.noyau.tc.noee.lds.com" /> 
  </recupererInfosResponse> 
  </soapenv:Body> 
  </soapenv:Envelope>

Does anyone know what I am missing or have any idea/suggestion ? 
Thanks

Mime
View raw message