You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nige White <ni...@forward-comp.co.uk> on 2004/11/22 17:20:50 UTC

Newbie Axis user converting from Apache Soap

Hi everyone,

I've been working with Apache Soap for a while. I'm working with a 
proprietary language on my server called "Synergy DBL". This language 
has a primitive type of "WSDL" which defines compound data types, and 
methods. So I'm generating the "Synergy DBL" server side code myself 
with a complex XSLT transformation.

On the server side, I'm using Java. I've been using XSLT to generate my 
own client classes from this primitive WSDL-type definition. I've been 
generating Apache Soap client code, and it worked well, but the 
performance was a little slow.

Now I'm interested in transforming the Synergy method definitions to 
proper WSDL, and using WSDL2Java to generate the client code. Will Axis 
code be faster?

It should be just a straight XSLT transform. In goes:

<?xml version='1.0'?>
<component name="aspclasses">
  <structure name="Asp_login" size="723">
    <field name="P_company_code" type="alpha" size="3"/>
    <field name="P_logon_id" type="alpha" size="10"/>
    <field name="P_password" type="alpha" size="10"/>
    <field name="R_client_no" type="alpha" size="6"/>
    <field name="R_client_name" type="alpha" size="35"/>
    <field name="R_client_opts" type="alpha" size="10"/>
    <field name="R_error_desc" type="alpha" size="132"/>
    <field name="P_user_id" type="alpha" size="3"/>
    <field name="R_menu_tot" type="integer" size="4"/>
    <field name="R_exposed_desc" type="alpha" size="30" dim="10"/>
    <field name="R_fclasp_app$$" type="alpha" size="10" dim="10"/>
    <field name="R_fclasp_ui$$" type="alpha" size="10" dim="10"/>
    <field name="R_seclv" type="alpha" size="1" dim="10"/>
  </structure>
  <interface name="asp">
    <method name="asp_login" id="asp_login" elb="ELB:ASPLIB">
      <methodresult type="integer" size="4"/>
      <param name="asp_login" type="structure" structureName="Asp_login" 
dir="inout"/>
    </method>
  </interface>
</component>

You can see the correlation easily...

And out comes the following just fine:

<?xml version="1.0" encoding="UTF-8"?>
<definitions
    xmlns:fcl="urn:forward-comp.co.uk"
    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xse="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsltc="http://xml.apache.org/xalan/xsltc"
    xmlns="http://schemas.xmlsoap.org/wsdl/">

<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" 
targetNamespace="urn:forward-comp.co.uk">
<complexType name="Asp_login">
<element name="P_company_code" type="xsd:string"/>
<element name="P_logon_id" type="xsd:string"/>
<element name="P_password" type="xsd:string"/>
<element name="R_client_no" type="xsd:string"/>
<element name="R_client_name" type="xsd:string"/>
<element name="R_client_opts" type="xsd:string"/>
<element name="R_error_desc" type="xsd:string"/>
<element name="P_user_id" type="xsd:string"/>
<element name="R_menu_tot" type="xsd:int"/>
<element maxOccurs="10" name="R_exposed_desc" type="xsd:string"/>
<element maxOccurs="10" name="R_fclasp_app_dr_dr" type="xsd:string"/>
<element maxOccurs="10" name="R_fclasp_ui_dr_dr" type="xsd:string"/>
<element maxOccurs="10" name="R_seclv" type="xsd:string"/>
</complexType>
</schema>
</types>

<message name="asp_loginRequest">
<part xmlns="http://www.w3.org/2001/XMLSchema" name="asp_login" 
type="fcl:Asp_login"/>
</message>
<message name="asp_loginResponse">
<part xmlns="http://www.w3.org/2001/XMLSchema" name="asp_loginReturn" 
type="xsd:int"/>
<part xmlns="http://www.w3.org/2001/XMLSchema" name="asp_login" 
type="fcl:Asp_login"/>
</message>

<portType name="asp">
    <operation name="asp_login">
        <input message="asp_loginRequest"/>
        <output message="asp_loginResponse"/>
    </operation>
</portType>

</definitions>

(I change the invalid "$" signs (Don't ask!) to "_dr")

When I run WSDL2Java, I get the following Exception:

java.io.IOException: Type {http://lang.java}StringBuffer is referenced 
but not defined.
    at 
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:652)
    at 
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:532)
    at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
    at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
    at java.lang.Thread.run(Thread.java:534)

Anyone know what this is all about? I'm not referencnig StringBuffer 
anywhere!

Thanks for any help!

Nige

_____________________________________________________________________
This message has been checked for all known viruses. Virus scanning
powered by Messagelabs http://www.messagelabs.com For more information
e-mail : hostmaster@forward-comp.co.uk



Re: Newbie Axis user converting from Apache Soap

Posted by Nige White <ni...@forward-comp.co.uk>.
Oops!

OK, what I was processing wasn't what I posted. There was some old WSDL 
with StringBuffer in it.

Still working on it!

Sorryeveryone,

Nige

_____________________________________________________________________
This message has been checked for all known viruses. Virus scanning
powered by Messagelabs http://www.messagelabs.com For more information
e-mail : hostmaster@forward-comp.co.uk