Hi All,
I have a policy-annotated WSDL (It is the one from policy sample03 in
rampart-1.1). I am trying to generate client stubs using wsdl2java in
order to invoke the WS.
I get this error:
D:\Develop\rampart\axis2-1.1.1\bin>wsdl2java -uri sample03.wsdl -p test -d adb -
s -o build/client
Using AXIS2_HOME: D:\Develop\rampart\axis2-1.1.1
Using JAVA_HOME: C:\Program Files\Java\jdk1.5.0_09
cannot find a PolicyExtension to process http://schemas.xmlsoap.org/ws/2005/07/s
ecuritypolicytype assertions
Do i have to have any XSDs in advance? I tried placing the rampart's
assertion XSD, as well as the WS-SecurityPolicy XSD in the same
directory where wsdl2java.bat is located , but with no success.
I have another question: Suppose I have to client stubs generated, is
it possible to generate back the policy-annotated WSDL using the
reverse command - java2wsdl ?
Thank you for the feedback. I am attaching the WSDL i am using in my test.
Best Regards,
Angel
<wsdl:definitions xmlns:axis2="http://sample03.policy.samples.rampart.apache.org" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns0="http://sample03.policy.samples.rampart.apache.org/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://sample03.policy.samples.rampart.apache.org"><wsdl:types><xs:schema xmlns:ns="http://sample03.policy.samples.rampart.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://sample03.policy.samples.rampart.apache.org/xsd">
<xs:element name="echo">
<xs:complexType>
<xs:sequence>
<xs:element name="param0" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="echoResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema></wsdl:types><wsdl:message name="echoMessage"><wsdl:part name="part1" element="ns0:echo"/></wsdl:message><wsdl:message name="echoResponse"><wsdl:part name="part1" element="ns0:echoResponse"/></wsdl:message><wsdl:portType name="sample03PortType"><wsdl:operation name="echo"><wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:echoMessage" wsaw:Action="urn:echo"/><wsdl:output message="axis2:echoResponse"/></wsdl:operation></wsdl:portType><wsdl:binding name="sample03SOAP11Binding" type="axis2:sample03PortType"><wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" Id="SigEncr"><wsp:ExactlyOne><wsp:All><sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><wsp:Policy><sp:InitiatorToken><wsp:Policy><sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"><wsp:Policy><sp:WssX509V3Token10/></wsp:Policy></sp:X509Token></wsp:Policy></sp:InitiatorToken><sp:RecipientToken><wsp:Policy><sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"><wsp:Policy><sp:WssX509V3Token10/></wsp:Policy></sp:X509Token></wsp:Policy></sp:RecipientToken><sp:AlgorithmSuite><wsp:Policy><sp:TripleDesRsa15/></wsp:Policy></sp:AlgorithmSuite><sp:Layout><wsp:Policy><sp:Strict/></wsp:Policy></sp:Layout><sp:IncludeTimestamp/><sp:OnlySignEntireHeadersAndBody/></wsp:Policy></sp:AsymmetricBinding><sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><sp:Policy><sp:MustSupportRefKeyIdentifier/><sp:MustSupportRefIssuerSerial/></sp:Policy></sp:Wss10><sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><sp:Body/></sp:SignedParts><sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><sp:Body/></sp:EncryptedParts></wsp:All></wsp:ExactlyOne></wsp:Policy><soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/><wsdl:operation name="echo"><soap:operation soapAction="urn:echo" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="sample03SOAP12Binding" type="axis2:sample03PortType"><wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" Id="SigEncr"><wsp:ExactlyOne><wsp:All><sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><wsp:Policy><sp:InitiatorToken><wsp:Policy><sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"><wsp:Policy><sp:WssX509V3Token10/></wsp:Policy></sp:X509Token></wsp:Policy></sp:InitiatorToken><sp:RecipientToken><wsp:Policy><sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"><wsp:Policy><sp:WssX509V3Token10/></wsp:Policy></sp:X509Token></wsp:Policy></sp:RecipientToken><sp:AlgorithmSuite><wsp:Policy><sp:TripleDesRsa15/></wsp:Policy></sp:AlgorithmSuite><sp:Layout><wsp:Policy><sp:Strict/></wsp:Policy></sp:Layout><sp:IncludeTimestamp/><sp:OnlySignEntireHeadersAndBody/></wsp:Policy></sp:AsymmetricBinding><sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><sp:Policy><sp:MustSupportRefKeyIdentifier/><sp:MustSupportRefIssuerSerial/></sp:Policy></sp:Wss10><sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><sp:Body/></sp:SignedParts><sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"><sp:Body/></sp:EncryptedParts></wsp:All></wsp:ExactlyOne></wsp:Policy><soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/><wsdl:operation name="echo"><soap12:operation soapAction="urn:echo" style="document"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="sample03HttpBinding" type="axis2:sample03PortType"><http:binding verb="POST"/><wsdl:operation name="echo"><http:operation location="echo"/><wsdl:input><mime:content type="text/xml"/></wsdl:input><wsdl:output><mime:content type="text/xml"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="sample03"><wsdl:port name="sample03SOAP11port_http" binding="axis2:sample03SOAP11Binding"><soap:address location="http://localhost:8080/axis2/services/sample03"/></wsdl:port><wsdl:port name="sample03SOAP12port_http" binding="axis2:sample03SOAP12Binding"><soap12:address location="http://localhost:8080/axis2/services/sample03"/></wsdl:port><wsdl:port name="sample03Httpport1" binding="axis2:sample03HttpBinding"><http:address location="http://localhost:8080/axis2/rest/sample03"/></wsdl:port></wsdl:service></wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]