axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anne Thomas Manes <atma...@gmail.com>
Subject Re: WS works, but cannot view WSDL
Date Fri, 17 Feb 2006 15:56:44 GMT
Since you have defined your own WSDL, I suggest you tell Axis to use your
WSDL rather than generating a new one. You do so by specifying:

<wsdlFile>[wsdl-url]</wsdlFile>

in the WSDD. (make sure that you change the soap:location attribute to point
to the correct URL)

Doing so allows you to remove the following parameters from the WSDD:

<parameter name="wsdlTargetNamespace"
     value="http://d2hawkeye.com/api/vmr/"/>
<parameter name="wsdlServiceElement" value="VMRService"/>
<parameter name="schemaUnqualified"
     value="http://d2hawkeye.com/api/vmr/"/>
<parameter name="wsdlServicePort" value="VMRService"/>
<parameter name="wsdlPortType" value="VMR"/>

One more note: you should remove the namespace attributes from the
<wsdlsoap:body> definitions in your binding. The namespace attribute should
be use only with RPC style services.

Anne

On 2/17/06, Greg Michalopoulos <GMichalopoulos@d2hawkeye.com> wrote:
>
> Using Axis 1.3. I created the WSDL below by hand (via xsl).  I created
> the skeleton and stub using WSDL2Java no problem, but the deploy.wsdd
> (below as well) has lines like this - qname="ns:>Claim" - when I
> expected it to be - qname="ns:Claim".  I am able to deploy and use the
> web service without issue.  The problem is that when I goto
> http://myip:myport/services/VMRService?wsdl I get the following error:
>
> AXIS error
>
> Sorry, something seems to have gone wrong... here are the details:
>
> Fault - makeTypeElement() was told to create a type
> "{http://d2hawkeye.com/api/vmr/}>Claim", with no containing element
>
> AxisFault
> faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
> faultSubcode:
> faultString: makeTypeElement() was told to create a type
> "{http://d2hawkeye.com/api/vmr/}>Claim", with no containing element
> faultActor:
> faultNode:
> faultDetail:
>         {http://xml.apache.org/axis/}hostname:
>
> So while it appears to be working fine, I know something is wrong but
> not sure where.  I'm guessing my namespaces but am not sure how to
> figure this out.  Any suggestions welcome.
>
> Thanks,
> Greg
>
> ***WSDL***
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
>   Automatically generated by parsing Clover-ETL output with XSL script
> -->
> <wsdl:definitions targetNamespace="http://d2hawkeye.com/api/vmr/"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:impl="http://d2hawkeye.com/api/vmr/"
> xmlns:intf="http://d2hawkeye.com/api/vmr/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> 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="http://d2hawkeye.com/api/vmr/"
> xmlns="http://www.w3.org/2001/XMLSchema">
>    <element name="Claim">
>      <complexType>
>       <sequence>
>        <element maxOccurs="1" minOccurs="0" name="SN" type="xsd:float"
> />
>        ...
>          ...
>        <element maxOccurs="1" minOccurs="0" name="RECEIVEDMONTH"
> type="xsd:date" />
>       </sequence>
>      </complexType>
>     </element>
>     <element name="Claims">
>      <complexType>
>       <sequence>
>        <element maxOccurs="unbounded" minOccurs="0" ref="impl:Claim"/>
>       </sequence>
>      </complexType>
>     </element>
>     <element name="Member">
>      <complexType>
>       <sequence>
>        <element maxOccurs="1" minOccurs="1" name="memberID"
> type="xsd:string"/>
>        <element maxOccurs="1" minOccurs="0" ref="impl:Claims"/>
>       </sequence>
>      </complexType>
>     </element>
>   </schema>
> </wsdl:types>
> <wsdl:message name="getVMRRequest">
>   <wsdl:part name="MemberReq" element="impl:Member"/>
> </wsdl:message>
> <wsdl:message name="getVMRResponse">
>   <wsdl:part name="MemberRes" element="impl:Member"/>
> </wsdl:message>
> <wsdl:portType name="VMR">
>   <wsdl:operation name="getVMR">
>    <wsdl:input message="impl:getVMRRequest" name="getVMRRequest"/>
>    <wsdl:output message="impl:getVMRResponse" name="getVMRResponse"/>
>   </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="VMRServiceSoapBinding" type="impl:VMR">
>   <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>   <wsdl:operation name="getVMR">
>    <wsdlsoap:operation soapAction=""/>
>    <wsdl:input name="getVMRRequest">
>     <wsdlsoap:body namespace="http://d2hawkeye.com/api/vmr/"
> use="literal"/>
>    </wsdl:input>
>    <wsdl:output name="getVMRResponse">
>     <wsdlsoap:body namespace="http://d2hawkeye.com/api/vmr/"
> use="literal"/>
>    </wsdl:output>
>   </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="VMRService">
>   <wsdl:port binding="impl:VMRServiceSoapBinding" name="VMRService">
>    <wsdlsoap:address
> location="http://localhost:8084/services/VMRService"/>
>   </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
> ***WSDL***
>
> ***WSDD***
>
> <!-- Use this file to deploy some handlers/chains and services      -->
> <!-- Two ways to do this:                                           -->
> <!--   java org.apache.axis.client.AdminClient deploy.wsdd          -->
> <!--      after the axis server is running                          -->
> <!-- or                                                             -->
> <!--   java org.apache.axis.utils.Admin client|server deploy.wsdd   -->
> <!--      from the same directory that the Axis engine runs         -->
>
> <deployment
>     xmlns="http://xml.apache.org/axis/wsdd/"
>     xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>
>   <!-- Services from VMRService WSDL service -->
>
>   <service name="VMRService" provider="java:RPC" style="document"
> use="literal">
>       <parameter name="wsdlTargetNamespace"
> value="http://d2hawkeye.com/api/vmr/"/>
>       <parameter name="wsdlServiceElement" value="VMRService"/>
>       <parameter name="schemaUnqualified"
> value="http://d2hawkeye.com/api/vmr/"/>
>       <parameter name="wsdlServicePort" value="VMRService"/>
>       <parameter name="className"
> value="com.d2hawkeye.api.vmr.VMRServiceSoapBindingSkeleton"/>
>       <parameter name="wsdlPortType" value="VMR"/>
>       <parameter name="typeMappingVersion" value="1.2"/>
>       <parameter name="allowedMethods" value="*"/>
>       <parameter name="scope" value="Session"/>
>
>       <typeMapping
>         xmlns:ns="http://d2hawkeye.com/api/vmr/"
>         qname="ns:>Claim"
>         type="java:com.d2hawkeye.api.vmr.Claim"
>         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>         encodingStyle=""
>       />
>       <typeMapping
>         xmlns:ns="http://d2hawkeye.com/api/vmr/"
>         qname="ns:>Member"
>         type="java:com.d2hawkeye.api.vmr.Member"
>         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>         encodingStyle=""
>       />
>       <arrayMapping
>         xmlns:ns="http://d2hawkeye.com/api/vmr/"
>         qname="ns:>Claims"
>         type="java:com.d2hawkeye.api.vmr.Claim[]"
>         innerType="cmp-ns:Claim"
> xmlns:cmp-ns="http://d2hawkeye.com/api/vmr/"
>         encodingStyle=""
>       />
>   </service>
> </deployment>
>
> ***WSDD***
>

Mime
View raw message