[jboss-user] [JBoss Web Services] New message: "Client says MTOM policy not supported"

Martin Sarabura do-not-reply at jboss.com
Wed Feb 24 14:47:04 EST 2010


User development,

A new message was posted in the thread "Client says MTOM policy not supported":

http://community.jboss.org/message/528313#528313

Author  : Martin Sarabura
Profile : http://community.jboss.org/people/steeqs4

Message:
--------------------------------------------------------------
I've deployed some ws client code to JBoss 5.1 and get the error "Policy not supported! #wsmtom_policy" when creating the service instance.
 
The stack trace to the point where the error occurs is here:
PolicyDeployer.getDomainDeployerInstance(String) line: 245     
PolicyDeployer.deployAssertionClientSide(PrimitiveAssertion, ExtensibleMetaData) line: 232     
PolicyDeployer.deployClientSide(Policy, ExtensibleMetaData) line: 169     
PolicyMetaDataBuilder.deployPolicyClientSide(Policy, PolicyScopeLevel, ExtensibleMetaData, PolicyDeployer) line: 307     
PolicyMetaDataBuilder.deployPolicy(Policy, PolicyScopeLevel, ExtensibleMetaData) line: 274     
PolicyMetaDataBuilder.processPolicies(List<WSDLExtensibilityElement>, PolicyScopeLevel, PolicyRegistry, ExtensibleMetaData) line: 233     
PolicyMetaDataBuilder.processPolicyExtensions(EndpointMetaData, WSDLDefinitions) line: 190     
JAXWSClientMetaDataBuilder.buildMetaData(QName, URL, UnifiedVirtualFile) line: 93     
ServiceDelegateImpl.<init>(URL, QName, Class) line: 146     
ServiceDelegateImpl.<init>(URL, QName, Class, WebServiceFeature[]) line: 117     
ProviderImpl.createServiceDelegate(URL, QName, Class, WebServiceFeature...) line: 111     
ProviderImpl.createServiceDelegate(URL, QName, Class) line: 104     
Service.<init>(URL, QName) line: 56     
Service.create(URL, QName) line: 680     
Attachments.getIntegrity(AttachmentInfo, Credentials) line: 121     


 
where in the method Attachments.getIntegrity() my code looks like this:
 
     URL wsurl = new URL(protocol, part1.getHost(),
          port, "/webservices/2009/Integrity?wsdl");
     QName svcName = new QName("http://webservice.mks.com/2009/Integrity",
          "Integrity_2009Service");
     Service service = Service.create(wsurl, svcName);

 
In PolicyDeployer.getDomainDeployerInstance() there are four entries in the domainDeployerMap:
http://docs.oasis-open.org/ws-rx/wsrmp/200702
http://schemas.xmlsoap.org/ws/2005/02/rm/policy
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd
http://www.w3.org/2006/05/addressing/wsdl

and the policy I am looking up is this:
http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization
 
Any thoughts as to what is going wrong? I am stumped. Thanks!
The wsdl is included below...
 
 
<definitions name="Integrity_2009Service"
     targetNamespace="http://webservice.mks.com/2009/Integrity"
     xmlns="http://schemas.xmlsoap.org/wsdl/"
     xmlns:ns1="http://webservice.mks.com/2009/Integrity/schema"
     xmlns:ns2="http://webservice.mks.com/2009/Integrity/fault"
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:tns="http://webservice.mks.com/2009/Integrity"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:ns3="http://www.w3.org/2005/05/xmlmime">
     <wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsmtom_policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
          <wsoma:OptimizedMimeSerialization xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"/>
     </wsp:Policy>
   <types>
*****   schema stuff here...
   </types>
   <message name="...">
*****     various messages here
   </message>
   <portType name="Integrity_2009">
*****    various operations here
   </portType>
   <binding name="Integrity_2009Binding" type="tns:Integrity_2009">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
       <wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
               URI="#wsmtom_policy" required="true"/>
      <operation name="...">
         <soap:operation soapAction=""/>
         <input>
            <soap:body use="literal"/>
         </input>
         <output>
            <soap:body use="literal"/>
         </output>
         <fault name="MKSException">
            <soap:fault name="MKSException" use="literal"/>
         </fault>
      </operation>
   </binding>
   <service name="Integrity_2009Service">
      <port binding="tns:Integrity_2009Binding" name="Integrity_2009Port">
          <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
      </port>
   </service>
</definitions>


--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/528313#528313




More information about the jboss-user mailing list