[jboss-user] [JBossWS] - Re: MTOM + WS Security = problem

davideling do-not-reply at jboss.com
Tue Jun 26 06:52:00 EDT 2007


This time I'm trying a simpler example
MTOM/WS-Security onl with username and password

In my service client,
if I comment out

// ((StubExt) port).setConfigName("Standard WSSecurity Client");

I get MTOM work correctly


  | POST /servizioJBossWSSEAttachment/ServizioWSSEAttachment?datatype=JBossWSMessage HTTP/1.1
  | Authorization: Basic bXl1c2VybmFtZTpteXBhc3N3b3Jk
  | SOAPAction: ""
  | Content-Type: multipart/related; type="application/xop+xml"; start="<rootpart at ws.jboss.org>"; 
  | 	start-info="text/xml"; 
  | 	boundary="----=_Part_0_31571602.1182853646985"
  | JBoss-Remoting-Version: 22
  | User-Agent: JBossRemoting - 2.2.0 SP4 (Bluto)
  | Host: localhost:8181
  | Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
  | Connection: keep-alive
  | Content-Length: 453280
  | 
  | 
  | ------=_Part_0_31571602.1182853646985
  | Content-Type: application/xop+xml; type="text/xml"
  | Content-Transfer-Encoding: 8bit
  | Content-ID: <rootpart at ws.jboss.org>
  | 
  | <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns1:inputMessage xmlns:ns1="http://www.tai.it/ServizioWSSEAttachment"><attachment><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:attachment-6707b7bd-51d9-4d4f-b133-f0a4774a2874 at ws.jboss.org"/></attachment><name>Davide</name><surname>Ling</surname></ns1:inputMessage></env:Body></env:Envelope>
  | ------=_Part_0_31571602.1182853646985
  | Content-Type: application/octet-stream
  | Content-Transfer-Encoding: binary
  | Content-Id: <attachment-6707b7bd-51d9-4d4f-b133-f0a4774a2874 at ws.jboss.org>
  | 
  | %PDF-1.4
  | blablabla...
  | 

But if I enable WS-Security MTOM doesn't work any more.
The client doesn't send a multipart related message,
but inserts the xop:include tag with the attachment reference.

I use JBoss 4.2.0 GA, JDK 1.5.0_12 on Linux 32 bit


  | POST /servizioJBossWSSEAttachment/ServizioWSSEAttachment?datatype=JBossWSMessage HTTP/1.1
  | Authorization: Basic bXl1c2VybmFtZTpteXBhc3N3b3Jk
  | SOAPAction: ""
  | Content-Type: text/xml; charset=UTF-8
  | JBoss-Remoting-Version: 22
  | User-Agent: JBossRemoting - 2.2.0 SP4 (Bluto)
  | Host: localhost:8181
  | Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
  | Connection: keep-alive
  | Content-Length: 828
  | 
  | <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
  | <env:Header>
  | <wsse:Security env:mustUnderstand='1' ... >
  | <wsse:UsernameToken wsu:Id='token-1-1182854743065-9708927'>
  | <wsse:Username>myusername</wsse:Username>
  | <wsse:Password>mypassword</wsse:Password>
  | </wsse:UsernameToken></wsse:Security>
  | </env:Header>
  | <env:Body>
  | <ns1:inputMessage xmlns:ns1='http://www.tai.it/ServizioWSSEAttachment'>
  | <attachment>
  | <xop:Include href='cid:attachment-f4e31927-67ed-4162-8a0e-86e53e96b316 at ws.jboss.org' xmlns:xop='http://www.w3.org/2004/08/xop/include'/>
  | </attachment>
  | <name>Davide</name>
  | <surname>Ling</surname>
  | </ns1:inputMessage>
  | </env:Body>
  | </env:Envelope>
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057646#4057646

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057646



More information about the jboss-user mailing list