[ 
https://wso2.org/jira/browse/MASHUP-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16500#action_16500
 ] 

Jonathan Marsh commented on MASHUP-774:
---------------------------------------

username and password properties have been added to the WebService object, and 
passed through into WSRequest.js.

The following request is generated from version.getVersion after enabling 
usernameToken authentication, and adding this to the custom UI:

        version.username = "jonathan";
        version.password = "jonathan";

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>
  <s:Header>
    
<wsa:To>https://localhost:7443/services/system/version.SecureSOAP12Endpoint</wsa:To>
    
<wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address></wsa:ReplyTo>
    
<wsa:MessageID>http://identifiers.wso2.com/messageid/1210038954806/7823380953</wsa:MessageID>
    
<wsa:Action>http://services.mashup.wso2.org/version/ServiceInterface/friendlyBuildDateRequest</wsa:Action>
    <o:Security s:mustUnderstand="1" 
xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 
xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";>
      <u:Timestamp u:Id="uuid-c3cdb38b-e4aa-4467-9d0e-dd30f081e08d-5">
        <u:Created>2008-05-06T01:55:54.806Z</u:Created>
        <u:Expires>2008-05-06T01:55:59.806Z</u:Expires>
      </u:Timestamp>
      <o:UsernameToken u:Id="Me" >
        <o:Username>jonathan</o:Username>
        <o:Password 
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";>jonathan</o:Password>
      </o:UsernameToken>
    </o:Security>
  </s:Header>
  <s:Body></s:Body>
</s:Envelope>

Which looked pretty good to me.  This results in the following mustUnderstand 
check fault.  What am I doing wrong?

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";

><soapenv:Header 
>xmlns:wsa="http://www.w3.org/2005/08/addressing";><wsa:Action>http://www.w3.org/2005

/08/addressing/soap/fault</wsa:Action><wsa:RelatesTo>http://identifiers.wso2.com/messageid/1210038954806

/7823380953</wsa:RelatesTo></soapenv:Header><soapenv:Body><soapenv:Fault 
xmlns:axis2ns55="http://www

.w3.org/2003/05/soap-envelope"><soapenv:Code><soapenv:Value>axis2ns55:MustUnderstand</soapenv:Value>

</soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">Must Understand 
check failed for header

 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
 : Security</soapenv

:Text></soapenv:Reason><soapenv:Detail><Exception>org.apache.axis2.AxisFault: 
Must Understand check failed

 for header 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
 : Security

&#xd;

        at 
org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:102)&#xd;

        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:166)&#xd;

        at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java

:275)&#xd;

        at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)&#xd;

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)&#xd;

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)&#xd;

        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252

)&#xd;

        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)&#xd;

        at 
org.wso2.mashup.transport.ServiceUIFilter.doFilter(ServiceUIFilter.java:210)&#xd;

        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202

)&#xd;

        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)&#xd;

        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)&#xd;

        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)&#xd;

        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)&#xd;

        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)&#xd;

        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)&#xd;

        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)&#xd;

        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)&#xd;

        at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol

.java:667)&#xd;

        at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)&#xd;

        at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)&

#xd;

        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)&#xd;

        at java.lang.Thread.run(Thread.java:595)&#xd;

</Exception></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

> Add WSS support to stub and tryit.
> ----------------------------------
>
>                 Key: MASHUP-774
>                 URL: https://wso2.org/jira/browse/MASHUP-774
>             Project: WSO2 Mashup Server
>          Issue Type: Improvement
>            Reporter: Jonathan Marsh
>            Assignee: Jonathan Marsh
>             Fix For: 1.1
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to