You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ma...@arcor.net on 2004/03/03 13:43:50 UTC
Handling of multi-refs in Axis 1.1
Hi,
I am not sure if I should file a bug report about this, so I'd like to move my
question from the user list to this list.
I disabled the use of multi-refs in server-config.wsdd, but still they are
generated.
From server-config.wsdd:
[..]
<globalConfiguration>
[..]
<parameter name="sendXsiTypes" value="false"/>
<parameter name="sendMultiRefs" value="false"/>
<parameter name="sendXMLDeclaration" value="true"/>
<parameter name="axis.sendMinimizedElements" value="false"/>
[..]
</globalConfiguration>
[..]
<service name="XYZService" provider="java:RPC" style="document" use="encoded">
<parameter name="wsdlTargetNamespace" value="urn:xyz"/>
<parameter name="wsdlServiceElement" value="XYZ"/>
<parameter name="wsdlServicePort" value="XYZService"/>
<parameter name="className" value=
"de.zzz.xyz.xyzservices.server.XYZServiceImpl"/>
<parameter name="wsdlPortType" value="XYZService"/>
<requestFlow>
<handler type=
"java:de.zzz.kba.kbaservices.server.axis.ValidatingHandler"/>
</requestFlow>
<responseFlow>
<handler type=
"java:de.zzz.kba.kbaservices.server.axis.ValidatingHandler"/>
</responseFlow>
<operation name="process" qname="process" >
<parameter name="changeBillingAddressRequest" type=
"tns:ChangeBillingAddressRequest" xmlns:tns="urn:xyz"/>
<fault name="InvalidValidFromDateException" qname="fault" class=
"de.zzz.xyz.generated.ws.server.xyz.InvalidValidFromDateException" type=
"tns:InvalidValidFromDateException" xmlns:tns="urn:xyz"/>
<fault name="AddressValidationException" qname="fault" class=
"de.zzz.xyz.generated.ws.server.xyz.AddressValidationException" type=
"tns:AddressValidationException" xmlns:tns="urn:xyz"/>
</operation>
[..]
From the wsdl:
<wsdl:binding name="XYZServiceSoapBinding" type="xyz:XYZService">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<!-- Billing Address -->
<wsdl:operation name="process">
<wsdl:input name="changeBillingAddressRequest">
<wsdlsoap:body
use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:input>
<wsdl:output name="empty">
<wsdlsoap:body
use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
<wsdl:fault name="AddressValidationException">
<wsdlsoap:fault
use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:fault>
<wsdl:fault name="InvalidValidFromDateException">
<wsdlsoap:fault
use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:fault>
</wsdl:operation>
From the log:
<?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>
<readCustomerDataRequest href="#id0"></readCustomerDataRequest>
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns1:ReadCustomerDataRequest"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:xyz">
<user href="#id1"></user>
<password href="#id2"></password>
<customerNumber href="#id3"></customerNumber>
</multiRef>
<multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:User" xmlns:ns2="urn:xyz"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">pUser</multiRef>
<multiRef id="id2" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:Password" xmlns:ns3="urn:xyz"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">pPassword</multiRef>
<multiRef id="id3" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns4:CustomerNumber" xmlns:ns4="urn:xyz"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">123456789012xxxx</multiRef>
</soapenv:Body>
</soapenv:Envelope>
So there are still hrefs and ids in there.
The problem is that I'd like to validate the SOAP message and from the
discussion on the user list I got that this is not possible with Axis itself, so
I am trying to implement a handler for doing this, but the schema validation
fails, because the "hrefs" aren't defined in the WSDL.
On a sidebar. When I try to enter a bug report in Bugzilla, I am queried for a
product. Axis is not there. Still Axis is one of the queryable products for
existing bug reports. Am I doing something wrong?
Cheers,
Mariano
Re: Handling of multi-refs in Axis 1.1
Posted by Davanum Srinivas <di...@yahoo.com>.
Please try Axis 1.2Alpha.
--- Mariano.Kamp@arcor.net wrote:
> Hi,
>
> I am not sure if I should file a bug report about this, so I'd like to move my
> question from the user list to this list.
>
> I disabled the use of multi-refs in server-config.wsdd, but still they are
> generated.
>
> From server-config.wsdd:
>
> [..]
> <globalConfiguration>
> [..]
> <parameter name="sendXsiTypes" value="false"/>
> <parameter name="sendMultiRefs" value="false"/>
> <parameter name="sendXMLDeclaration" value="true"/>
> <parameter name="axis.sendMinimizedElements" value="false"/>
> [..]
> </globalConfiguration>
> [..]
> <service name="XYZService" provider="java:RPC" style="document" use="encoded">
> <parameter name="wsdlTargetNamespace" value="urn:xyz"/>
> <parameter name="wsdlServiceElement" value="XYZ"/>
> <parameter name="wsdlServicePort" value="XYZService"/>
> <parameter name="className" value=
> "de.zzz.xyz.xyzservices.server.XYZServiceImpl"/>
> <parameter name="wsdlPortType" value="XYZService"/>
>
> <requestFlow>
> <handler type=
> "java:de.zzz.kba.kbaservices.server.axis.ValidatingHandler"/>
> </requestFlow>
> <responseFlow>
> <handler type=
> "java:de.zzz.kba.kbaservices.server.axis.ValidatingHandler"/>
> </responseFlow>
>
> <operation name="process" qname="process" >
> <parameter name="changeBillingAddressRequest" type=
> "tns:ChangeBillingAddressRequest" xmlns:tns="urn:xyz"/>
> <fault name="InvalidValidFromDateException" qname="fault" class=
> "de.zzz.xyz.generated.ws.server.xyz.InvalidValidFromDateException" type=
> "tns:InvalidValidFromDateException" xmlns:tns="urn:xyz"/>
> <fault name="AddressValidationException" qname="fault" class=
> "de.zzz.xyz.generated.ws.server.xyz.AddressValidationException" type=
> "tns:AddressValidationException" xmlns:tns="urn:xyz"/>
> </operation>
> [..]
>
> From the wsdl:
>
> <wsdl:binding name="XYZServiceSoapBinding" type="xyz:XYZService">
>
> <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
> <!-- Billing Address -->
> <wsdl:operation name="process">
> <wsdl:input name="changeBillingAddressRequest">
> <wsdlsoap:body
> use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </wsdl:input>
> <wsdl:output name="empty">
> <wsdlsoap:body
> use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </wsdl:output>
> <wsdl:fault name="AddressValidationException">
> <wsdlsoap:fault
> use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </wsdl:fault>
> <wsdl:fault name="InvalidValidFromDateException">
> <wsdlsoap:fault
> use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> </wsdl:fault>
> </wsdl:operation>
>
> From the log:
>
> <?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>
> <readCustomerDataRequest href="#id0"></readCustomerDataRequest>
> <multiRef id="id0" soapenc:root="0"
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns1:ReadCustomerDataRequest"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:xyz">
> <user href="#id1"></user>
> <password href="#id2"></password>
> <customerNumber href="#id3"></customerNumber>
> </multiRef>
> <multiRef id="id1" soapenc:root="0"
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns2:User" xmlns:ns2="urn:xyz"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">pUser</multiRef>
> <multiRef id="id2" soapenc:root="0"
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns3:Password" xmlns:ns3="urn:xyz"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">pPassword</multiRef>
> <multiRef id="id3" soapenc:root="0"
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns4:CustomerNumber" xmlns:ns4="urn:xyz"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">123456789012xxxx</multiRef>
>
> </soapenv:Body>
> </soapenv:Envelope>
>
> So there are still hrefs and ids in there.
>
> The problem is that I'd like to validate the SOAP message and from the
> discussion on the user list I got that this is not possible with Axis itself, so
> I am trying to implement a handler for doing this, but the schema validation
> fails, because the "hrefs" aren't defined in the WSDL.
>
> On a sidebar. When I try to enter a bug report in Bugzilla, I am queried for a
> product. Axis is not there. Still Axis is one of the queryable products for
> existing bug reports. Am I doing something wrong?
>
> Cheers,
> Mariano
>
>
=====
Davanum Srinivas - http://webservices.apache.org/~dims/