axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <a...@manes.net>
Subject RE: WSDD configuration problems
Date Thu, 14 Oct 2004 15:53:31 GMT
Florain,

You specify that you want document/literal in the "style" attribute in the
<service> definition. I suggest you use the “wrapped” style. It will
generate a document/literal service, but it looks and feels like the RPC
style, so it won’t (or shouldn’t) require you to change your application.
Here’s an example:

    <service name="MyService" 
             provider="java:RPC"
             style="wrapped"
             use="literal">
    </service>

You also need to remove the encodingStyle attribute from your <typeMapping>
definitions.

Back to your previous question -- Axis changes the "XXXrealAddressXXX" URI
to the real address of the deployed service. Axis also maps the
targetNamespace of the WSDL file to the same URI. Axis, by default, uses the
"impl" namespace prefix to represent the WSDL targetNamespace. If you
specify a different namespace, then Axis generates a different namespace for
the type definition and assigns it a different namespace prefix. See my
previous posting on qnames, namespaces, and namespace prefixes in the
"beanMapping in WSDD" thread. 

Regards,
Anne

________________________________________
From: Florian Theurich [mailto:florian.theurich@x-cellcom.de] 
Sent: Thursday, October 14, 2004 10:42 AM
To: axis-user@ws.apache.org
Subject: RE: WSDD configuration problems

Hi Anne,

Thanks a lot for your explanations, they have been very helpful!!

I still have some questions though:

I added following entry to my server-config.wsdd:

<typeMapping qname="ns:ArrayOfString" xmlns:ns="XXXrealAddressXXX"
      type="java:java.lang.String[]"
      serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
      deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />

which resulted in following WSDL-Snippet:

<types>
  <schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="XXXrealAddressXXX">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="ArrayOfString">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:string[]"/>
     </restriction>
    </complexContent>
   </complexType>
   <complexType name="Con">
    <sequence>
     <element name="abbreviation" nillable="true" type="soapenc:string"/>
     <element name="city" nillable="true" type="soapenc:string"/>
     <element name="con" nillable="true" type="soapenc:string"/>
     <element name="country" nillable="true" type="soapenc:string"/>
     <element name="dateFrom" nillable="true" type="soapenc:string"/>
     <element name="dateTo" nillable="true" type="soapenc:string"/>
     <element name="products" nillable="true" type="impl:ArrayOfString"/>
     <element name="areas" nillable="true" type="impl:ArrayOfString"/>
     <element name="venue" nillable="true" type="soapenc:string"/>
     <element name="website" nillable="true" type="soapenc:string"/>
    </sequence>
   </complexType>
   <complexType name="ArrayOfCon">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Con[]"/>
     </restriction>
    </complexContent>
   </complexType>
  </schema>
 </types>

It still does not work with BEA Workshop. Coming back to one of my original
questions, when I change the xmlns:ns entry (within server-config.wsdd) from
the address the service is really located at to something arbitrary (e.g.
“someService” or whatever) the WSDL does not say ‘impl:ArrayOfString’ or
‘impl:Con[]’, but ‘tns1:ArrayOfString’ or ‘tns1:Con[]’! What does that mean?
  

I simply did not start with a WSDL as I was not that familiar with it and
wanted to get started without having to delve too deeply into it. Although
still not a pro, I would probably start with a WSDL today (what I might do
if I don't get it to work!)

You suggested to switch from rpc/encoded to document/literal. What would I
have to do for that (in terms of configuration) and what impact would that
change have on my service implementation??

Thanks
Florian



-----Ursprüngliche Nachricht-----
Von: Anne Thomas Manes [mailto:anne@manes.net] 
Gesendet: Mittwoch, 13. Oktober 2004 12:39
An: axis-user@ws.apache.org
Betreff: RE: WSDD configuration problems

One problem with your WSDL is that two of the elements in your Con type
reference a type (impl:ArrayOf_soapenc_string) that hasn't been defined:

<element name="products" nillable="true"
type="impl:ArrayOf_soapenc_string"/> 
<element name="areas" nillable="true" type="impl:ArrayOf_soapenc_string"/> 

As a result, any operation that exchanges the Con type or the ArrayOfCon
type won't work. You need to add a type definition for this type. (or add
addition typeMapping definitions in the wsdd for your string arrays.)

I assume that Axis generated a different namespace for the Con and
ArrayOfCon types because of your custom type mapping.

There's no problem with including an element called "con" within a complex
type called "Con".

It's generally a bad idea to use overloaded methods with SOAP. Each SOAP
implementation handles them somewhat differently.

Do you still have the WSDL definition that Workshop generated? I suggest you
start your Axis project with the WSDL file rather than with your application
code. 

I also suggest that you switch to document/literal rather than rpc/encoded,
but from your last response, I gather that you're not interested in making
any significant changes.

Anne

________________________________________
From: Florian Theurich [mailto:florian.theurich@x-cellcom.de] 
Sent: Tuesday, October 12, 2004 5:10 PM
To: axis-user@ws.apache.org
Subject: WSDD configuration problems

Hi there,

I posted a similar message last week, but I did not get any feedback. That’s
why I’ traing again…
I appended my WSDL to this email. Below you can find the entry within the
server-config.wsdd
for my service:

<service name="ConService" provider="java:RPC">
            <parameter name="allowedMethods" value="*" />
            <parameter name="className" value="com.xcell.ConService" />

            <beanMapping qname="ns:Con" xmlns:ns="someService" 
                  languageSpecificType="java:com.xcell.Con" /> 
            
            <typeMapping qname="ns:ArrayOfCon" 
                  xmlns:ns="someService"
                  type="java:com.xcell.Con[]"
                 
serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
                 
deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
                  encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
      
</service>

Now I have following questions:

1) Is there anything wrong concerning my approach in the WSDD?
2) Is it a problem to have a element named ‘con’ in a complex type named
‘Con’?
3) Why does my WDSL display the URL ‘http://xcell.com’ in following line of
the WSDL?Configuration problems…

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

4) Is it allowed to have overloaded operations for a web service as one of
my service’s method is overloaded!
5) Why do I get following error message in BEA Workshop 8.1 when trying to
create a Service Control based on the appended WSDL

    WARNING: sampleWSDL.wsdl Line 0, Col 0: Operation "getConInfo" cannot be
called.
    WARNING: sampleWSDL.wsdl Line 0, Col 0: Operation
"getConInfoByYearAndProduct" cannot be called.
    WARNING: sampleWSDL.wsdl Line 0, Col 0: Operation
"getConInfoByYearAndArea" cannot be called.
    WARNING: sampleWSDL.wsdl Line 0, Col 0: Operation "getConInfoByArea"
cannot be called.
    WARNING: sampleWSDL.wsdl Line 0, Col 0: Operation "getConInfoByProduct"
cannot be called.
    WARNING: sampleWSDL.wsdl Line 53, Col 0: WSDL warning: Schema type null
undefined.
    WARNING: sampleWSDL.wsdl Line 59, Col 0: WSDL warning: Schema type null
undefined.
    WARNING: sampleWSDL.wsdl Line 99, Col 0: WSDL warning: Schema type null
undefined.
    WARNING: sampleWSDL.wsdl Line 105, Col 0: WSDL warning: Schema type null
undefined.
    WARNING: sampleWSDL.wsdl Line 111, Col 0: WSDL warning: Schema type null
undefined.
    WARNING: sampleWSDL.wsdl Line 125, Col 0: WSDL warning: Schema type null
undefined.
    WARNING: sampleWSDL.wsdl Line 139, Col 0: WSDL warning: Schema type null
undefined.
    WARNING: sampleWSDL.wsdl Line 145, Col 0: WSDL warning: Schema type null
undefined.
    
Can anyone out there help me please?
Thanks
Florian
 




Mime
View raw message