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="<[EMAIL 
PROTECTED]>"; 
  |     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: <[EMAIL PROTECTED]>
  | 
  | <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:[email protected]"/></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: <[EMAIL PROTECTED]>
  | 
  | %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:[email protected]' 
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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to