axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GRESSIER Yoan <yoan.gress...@sncf.fr>
Subject RE: Creating AXIS web service waiting for complex type
Date Wed, 21 May 2003 10:41:20 GMT
Thanks, now, I can see my WSDL file !

But, the definition of my couple object is wrong in my WSDL file : according
to the WSDL, the couple object desn't contain any fields (we can't see the
"x" or the "y" field...) => see below

Any idea ? Where do i have to put that two ".class" files : HelloWorld.class
and Couple.class ? Is it true to put the two of them in the
"webapps\axis\WEB-INF\classes" folder of tomcat ?

Thanks for your response

Yoan

Here is the WSDL files generated now :

  <?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions
targetNamespace="http://localhost:8080/axis/services/HelloWorldTest"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:8080/axis/services/HelloWorldTest"
xmlns:intf="http://localhost:8080/axis/services/HelloWorldTest"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="urn:BeanService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <schema targetNamespace="urn:BeanService"
xmlns="http://www.w3.org/2001/XMLSchema">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> 
- <complexType name="Couple">
  <sequence /> 
  </complexType>
  </schema>
  </wsdl:types>
- <wsdl:message name="helloResponse">
  <wsdl:part name="helloReturn" type="xsd:string" /> 
  </wsdl:message>
- <wsdl:message name="addResponse">
  <wsdl:part name="addReturn" type="xsd:int" /> 
  </wsdl:message>
  <wsdl:message name="helloRequest" /> 
- <wsdl:message name="addRequest">
  <wsdl:part name="in0" type="tns1:Couple" /> 
  </wsdl:message>
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="add" parameterOrder="in0">
  <wsdl:input message="impl:addRequest" name="addRequest" /> 
  <wsdl:output message="impl:addResponse" name="addResponse" /> 
  </wsdl:operation>
- <wsdl:operation name="hello">
  <wsdl:input message="impl:helloRequest" name="helloRequest" /> 
  <wsdl:output message="impl:helloResponse" name="helloResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="HelloWorldTestSoapBinding" type="impl:HelloWorld">
  <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="add">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="addRequest">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/HelloWorldTest" use="encoded"
/> 
  </wsdl:input>
- <wsdl:output name="addResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/HelloWorldTest" use="encoded"
/> 
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="hello">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="helloRequest">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/HelloWorldTest" use="encoded"
/> 
  </wsdl:input>
- <wsdl:output name="helloResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/HelloWorldTest" use="encoded"
/> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="HelloWorldService">
- <wsdl:port binding="impl:HelloWorldTestSoapBinding" name="HelloWorldTest">
  <wsdlsoap:address
location="http://localhost:8080/axis/services/HelloWorldTest" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>



-----Message d'origine-----
De : Sameer Bombatkar [mailto:sameer_bom@hotmail.com]
Envoye : mercredi 21 mai 2003 12:05
A : axis-user@ws.apache.org
Objet : Re: Creating AXIS web service waiting for complex type


try with this deploy.wsdd ...I've commmented the changes below

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
             xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
             xmlns:ns1="HelloWorldTest" >

  <service name="HelloWorldTest" provider="java:RPC">
   <parameter name="className" value="HelloWorld"/>
   <parameter name="allowedMethods" value="*"/>
<!-- add the following line to your deploy.wsdd and redeploy the web service

-->
<beanMapping qname="myNS:Couple" xmlns:myNS="urn:BeanService"
          languageSpecificType="java:Couple"/>
  </service>
</deployment>



Sameer.






>From: GRESSIER Yoan <yoan.gressier@sncf.fr>
>Reply-To: axis-user@ws.apache.org
>To: "'axis-user@ws.apache.org'" <axis-user@ws.apache.org>
>Subject: Creating AXIS web service waiting for complex type
>Date: Wed, 21 May 2003 11:17:49 +0200
>MIME-Version: 1.0
>Received: from apache.org ([208.185.179.12]) by mc6-f27.law1.hotmail.com 
>with Microsoft SMTPSVC(5.0.2195.5600); Wed, 21 May 2003 02:18:10 -0700
>Received: (qmail 24951 invoked by uid 500); 21 May 2003 09:17:43 -0000
>Received: (qmail 24911 invoked from network); 21 May 2003 09:17:42 -0000
>X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP
>Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm
>Precedence: bulk
>list-help: <mailto:axis-user-help@ws.apache.org>
>list-unsubscribe: <mailto:axis-user-unsubscribe@ws.apache.org>
>list-post: <mailto:axis-user@xml.apache.org>
>Delivered-To: mailing list axis-user@ws.apache.org
>Message-ID: 
><1F5823F1C34FD3119F17005004B071C0073625B5@s64l06biahu.lugdunum.aigf.sncf.fr
>
>Organization: S.N.C.F. French Railways
>X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
>Return-Path: axis-user-return-15086-sameer_bom=hotmail.com@ws.apache.org
>X-OriginalArrivalTime: 21 May 2003 09:18:10.0383 (UTC) 
>FILETIME=[E5D325F0:01C31F79]
>
>How can i deploy in AXIS a web service waiting for a comples type as
>parameters ?
>
>Here is my complex type :
>public class Couple {
>   int x, y;
>   public Couple( int i, int j )   {       x = i; y = j;  }
>}
>
>
>Here is my WS :
>public class HelloWorld
>{
>   public int add( Couple c )
>   {
>     return c.x + c.y;
>   }
>}
>
>Here is the WSDD file used to deploy it with the command :java
>org.apache.axis.client.AdminClient
>-lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
><deployment xmlns="http://xml.apache.org/axis/wsdd/"
>             xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
>             xmlns:ns1="HelloWorldTest" >
>
>  <service name="HelloWorldTest" provider="java:RPC">
>   <parameter name="className" value="HelloWorld"/>
>   <parameter name="allowedMethods" value="*"/>
>  </service>
></deployment>
>
>
>I add that i have put the .class file in the "webapps\axis\WEB-INF\classes"
>folder of tomcat
>
>
>When i deploy it with a wsdd file, i get the following error while 
>accessing
>to the WSDL file :
>
>AXIS error
>Sorry, something seems to have gone wrong... here are the details:
>Fault - ; nested exception is:
>	WSDLException: faultCode=OTHER_ERROR: Can&apos;t find prefix for
>&apos;http://DefaultNamespace&apos;. Namespace prefixes must be set on the
>Definition object using the addNamespace(...) method.:
>AxisFault
>  faultCode: 
>{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: WSDLException: faultCode=OTHER_ERROR: Can&apos;t find prefix
>for &apos;http://DefaultNamespace&apos;. Namespace prefixes must be set on
>the Definition object using the addNamespace(...) method.:
>  faultActor:
>  faultNode:
>  faultDetail:
>
>Can somebody help me ? Thanks a lot
>
>Yoan

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

Mime
View raw message