2

I'm trying to write a SOAP client to connect to a PeopleSoft web service that is expecting HTTPS with WS-security. I'm using Apache CXF for the client. Here's what I've done:

1) Added the server certificate to a truststore: 'jssecacerts', using a Java utility found here: http://blogs.sun.com/andreas/entry/no_more_unable_to_find. [Editors's note: the original page has fallen off the web. However, I did find this page which I think repeats the contents of that post.]

2) Created Java client classes from the WSDL using CXF 2.3.1's WSDL2JAVA utility, after editing the script to set system properties to use the truststore I'd created.

3) Created client code like this:

    public void init(String endpoint, String peopleSoftUser, String peopleSoftPass) throws QueryException{

  this.peopleSoftUser = peopleSoftUser;
  this.peopleSoftPass = peopleSoftPass;

  loggingInterceptor = new LoggingOutInterceptor();
  loggingInInterceptor = new LoggingInInterceptor();

  //System.setProperty("javax.net.debug", "ssl");

  try {
   URL url = new URL(endpoint);
   log.debug("Using URL " + url);

   System.setProperty("javax.net.ssl.trustStore", "/Users/micksear/jssecacerts");
   System.setProperty("javax.net.ssl.trustStorePassword", "changeit");

   service = new QASQRYSERVICE(url);//, QASQRYSERVICE.SERVICE
   //port = service.getPort(QASQRYSERVICE.QASQRYSERVICEPort, QASQRYSERVICEPortType.class);
   port = service.getQASQRYSERVICEPort();
   conduit = (HTTPConduit) ClientProxy.getClient(port).getConduit();

   WSS4JOutInterceptor wss4j = new WSS4JOutInterceptor();
   wss4j.getProperties().put("action", "UsernameToken");
   wss4j.getProperties().put("passwordType", "PasswordText");//PasswordDigest
   wss4j.getProperties().put("user", "PS");
   wss4j.getProperties().put("passwordCallbackRef", new CallbackHandler(){

    @Override
    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
     WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
     log.debug("identifier: " + pc.getIdentifier());

     if (pc.getIdentifier().equals("PS")) {
      // set the password on the callback. This will later be compared to the
      // password which was sent from the client.
      pc.setPassword("PS");
     }
    }});

   ClientProxy.getClient(port).getOutInterceptors().add(loggingInterceptor);
   ClientProxy.getClient(port).getOutInterceptors().add(wss4j);
   ClientProxy.getClient(port).getInInterceptors().add(loggingInInterceptor);


  } catch (MalformedURLException e) {
   log.error(e.getMessage(), e);
   throw new QueryException(e);
  } 
 }

    public static void main(String[] args) throws MalformedURLException, QueryException {

  PeopleSoftQueryService qryService = new PeopleSoftQueryService();
  qryService.init("https://HR91DMO/PSIGW/PeopleSoftServiceListeningConnector/QAS_QRY_SERVICE.1.wsdl", "PS", "PS");

  try {
   QueryResult result = qryService.executeQuery("ABSENCE_REASON_LOOKUP");

   for (Map<String,String> row : result.getData()){
    System.out.println("Row: ");
    for (String key : row.keySet()){
     System.out.println("   " + key + " = " + row.get(key));
    }
   }
  } catch (SOAPFaultException e) {
   logSoapFaultException(e, log);
  }


 }

    public QueryResult executeQuery(String queryName) throws QueryException {
  QASEXEQRYSYNCREQMSGType msg = new QASEXEQRYSYNCREQMSGType();
  QASEXEQRYSYNCREQTypeShape msgTypeShape = new QASEXEQRYSYNCREQTypeShape();
  msgTypeShape.setQueryName(queryName);
  msgTypeShape.setIsConnectedQuery("N");
  msgTypeShape.setOwnerType("PUBLIC");
  msgTypeShape.setBlockSizeKB(new BigInteger("0"));
  msgTypeShape.setMaxRow(new BigInteger("100"));
  msgTypeShape.setOutResultType(OutResultTypeTypeDef.XMLP);
  msgTypeShape.setOutResultFormat(OutResultFormatTypeDef.NONFILE);
  msg.setQASEXEQRYSYNCREQ(msgTypeShape);

  QASGETQUERYRESULTSRESPMSGType result = port.qasEXECUTEQRYSYNCOPER(msg);

  Map<Integer,String> columnMetadata = new HashMap<Integer,String>();
  QueryResult resultData = new QueryResult();

  Iterator<ColumnDefinition> columnIterator = result.getWebRowSet().getMetadata().getColumnDefinition().iterator();
  while (columnIterator.hasNext()){
   ColumnDefinition column = columnIterator.next();
   String columnName = column.getColumnName();
   columnMetadata.put(new Integer(column.getColumnIndex()), columnName);
  }

  Iterator<Object> rowIterator = result.getWebRowSet().getData().getCurrentRowAndInsertRowAndDeleteRow().iterator();
  while (rowIterator.hasNext()){
   CurrentRow row = (CurrentRow) rowIterator.next();
   Map<String,String> rowMap = new HashMap<String,String>();
   for (int i = 0 ; i < columnMetadata.size() ; i++){
    String value = row.getColumnValue().get(i).toString();
    rowMap.put(columnMetadata.get(i), value);
   }

   resultData.addRow(rowMap);
  }

  resultData.setNumRows(resultData.getData().size());
  return resultData;
 }

So, the client classes were created from the HTTPS WSDL URL, and contain no HTTP references. The client code I've written contains no HTTP references. When I run the code, it seems to correctly perform SSL handshakes, and then throws an exception:

2010-12-22 11:44:50,162 [main] DEBUG org.apache.ws.security.util.Loader - 

org.apache.security.juice.provider.JuiCEProviderOpenSSL
java.lang.ClassNotFoundException: org.apache.security.juice.provider.JuiCEProviderOpenSSL
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 at org.apache.ws.security.util.Loader.loadClass(Loader.java:185)
 at org.apache.ws.security.WSSConfig.loadProvider(WSSConfig.java:605)
 at org.apache.ws.security.WSSConfig.addJceProvider(WSSConfig.java:662)
 at org.apache.ws.security.WSSConfig.staticInit(WSSConfig.java:306)
 at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:324)
 at org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:333)
 at org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:173)
 at org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor$WSS4JOutInterceptorInternal.handleMessage(WSS4JOutInterceptor.java:134)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
 at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
 at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
 at $Proxy42.qasEXECUTEQRYSYNCOPER(Unknown Source)
 at com.succeed.peoplesoft.soap.PeopleSoftQueryService.executeQuery(PeopleSoftQueryService.java:154)
 at com.succeed.peoplesoft.soap.PeopleSoftQueryService.main(PeopleSoftQueryService.java:188)
2010-12-22 11:44:50,164 [main] DEBUG org.apache.ws.security.WSSConfig - The provider JuiCE could not be added: org.apache.security.juice.provider.JuiCEProviderOpenSSL
2010-12-22 11:44:50,176 [main] DEBUG org.apache.ws.security.handler.WSHandler - Performing Action: 1
2010-12-22 11:44:50,177 [main] DEBUG com.succeed.peoplesoft.soap.PeopleSoftQueryService - identifier: PS
2010-12-22 11:44:50,179 [main] DEBUG org.apache.ws.security.message.WSSecUsernameToken - Begin add username token...
Dec 22, 2010 11:44:50 AM org.apache.cxf.interceptor.AbstractLoggingInterceptor log
INFO: Outbound Message
---------------------------
ID: 1
Address: http://192.168.1.91/PSIGW/PeopleSoftServiceListeningConnector
Encoding: UTF-8
Content-Type: text/xml
Headers: {SOAPAction=["QAS_EXECUTEQRYSYNC.VERSION_1"], Accept=[*/*]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soap:mustUnderstand="1"><wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-1"><wsse:Username>PS</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PS</wsse:Password></wsse:UsernameToken></wsse:Security></soap:Header><soap:Body><ns86:QAS_EXEQRY_SYNC_REQ_MSG xmlns:ns10="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_RECORD_DEFN_REQ_MSG.VERISON_1" xmlns:ns11="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_RECORD_DEFN_RESP_MSG.VERSION_1" xmlns:ns12="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERYSTATUS_REQ.VERSION_1" xmlns:ns13="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERYSTATUS_REQ_MSG.VERSION_1" xmlns:ns14="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERYSTATUS_RESP.VERSION_1" xmlns:ns15="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERYSTATUS_RESP_MSG.VERSION_1" xmlns:ns16="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_HIERARCHY_RECORDS_REQ_MSG.VERSION_1" xmlns:ns17="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_HIERARCHY_RECORDS_RESP_MSG.VERSION_1" xmlns:ns18="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_CANCELQUERY_REQ.VERSION_1" xmlns:ns19="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_CANCELQUERY_REQ_MSG.VERSION_1" xmlns:ns2="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTROLE_REQ_MSG.VERSION_1" xmlns:ns20="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_CANCELQUERY_RESP.VERSION_1" xmlns:ns21="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_CANCELQUERY_RESP_MSG.VERSION_1" xmlns:ns22="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTUSERROLES_REQ.VERSION_1" xmlns:ns23="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTUSERROLES_REQ_MSG.VERSION_1" xmlns:ns24="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTUSERROLES_RESP.VERSION_1" xmlns:ns25="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTUSERROLES_RESP_MSG.VERSION_1" xmlns:ns26="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERYFIELDS_REQ.VERSION_1" xmlns:ns27="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERYFIELDS_REQ_MSG.VERSION_1" xmlns:ns28="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERYFIELDS_RESP.VERSION_1" xmlns:ns29="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERYFIELDS_RESP_MSG.VERSION_1" xmlns:ns3="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTROLE_RESP.VERSION_1" xmlns:ns30="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_RELATED_RECORDS_REQ_MSG.VERSION_1" xmlns:ns31="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_RELATED_RECORDS_RESP_MSG.VERSION_1" xmlns:ns32="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTUSER_REQ.VERSION_1" xmlns:ns33="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTUSER_REQ_MSG.VERSION_1" xmlns:ns34="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTUSER_RESP.VERSION_1" xmlns:ns35="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTUSER_RESP_MSG.VERSION_1" xmlns:ns36="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERY_DETAILS_REQ_MSG.VERSION_1" xmlns:ns37="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERY_DETAILS_RESP_MSG.VERSION_1" xmlns:ns38="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERY_REQ.VERSION_1" xmlns:ns39="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERY_REQ_MSG.VERSION_1" xmlns:ns4="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTROLE_RESP_MSG.VERSION_1" xmlns:ns40="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERY_RESP.VERSION_1" xmlns:ns41="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERY_RESP_MSG.VERSION_1" xmlns:ns42="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_TREES_REQ_MSG.VERSION_1" xmlns:ns43="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_TREES_RESP_MSG.VERSION_1" xmlns:ns44="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTROLEUSERS_REQ.VERSION_1" xmlns:ns45="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTROLEUSERS_REQ_MSG.VERSION_1" xmlns:ns46="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTROLEUSERS_RESP.VERSION_1" xmlns:ns47="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTROLEUSERS_RESP_MSG.VERSION_1" xmlns:ns48="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_EXEQRY_ASYNC_REQ.VERSION_1" xmlns:ns49="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_EXEQRY_SYNC_REQ.VERSION_1" xmlns:ns5="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTROLE_REQ.VERSION_1" xmlns:ns50="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERYRESULTS_FILE_RESP.VERSION_1" xmlns:ns51="http://java.sun.com/xml/ns/jdbc" xmlns:ns52="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERYRESULTS_XMLP_RESP.VERSION_1" xmlns:ns53="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERYRESULTS_STATUS_RESP.VERSION_1" xmlns:ns54="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LOGIN_RESP_MSG.VERSION_1" xmlns:ns55="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERY_DELETE_REQ_MSG.VERSION_1" xmlns:ns56="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERY_DELETE_RESP_MSG.VERSION_1" xmlns:ns57="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETQUERYRESULTS_REQ.VERSION_1" xmlns:ns58="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETQUERYRESULTS_REQ_MSG.VERSION_1" xmlns:ns59="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERY_SAVE_REQ_MSG.VERSION_1" xmlns:ns6="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_AUTHTOKEN_REQ_MSG.VERSION_1" xmlns:ns60="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_QUERY_SAVE_RESP_MSG.VERSION_1" xmlns:ns61="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERYPROMPTS_REQ.VERSION_1" xmlns:ns62="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERYPROMPTS_REQ_MSG.VERSION_1" xmlns:ns63="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERYPROMPTS_RESP.VERSION_1" xmlns:ns64="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LISTQUERYPROMPTS_RESP_MSG.VERSION_1" xmlns:ns65="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_RECORDS_REQ_MSG.VERSION_1" xmlns:ns66="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_RECORDS_RESP_MSG.VERSION_1" xmlns:ns67="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETXLAT_REQ.VERSION_1" xmlns:ns68="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETXLAT_REQ_MSG.VERSION_1" xmlns:ns69="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETXLAT_RESP.VERSION_1" xmlns:ns7="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_AUTHTOKEN_RESP_MSG.VERSION_1" xmlns:ns70="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETXLAT_RESP_MSG.VERSION_1" xmlns:ns71="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_EXEQRY_SYNCPOLL_REQ.VERSION_1" xmlns:ns72="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_EXEQRYSYNCPOLL_RESP.VERSION_1" xmlns:ns73="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_EXEQRYSYNCPOLL_RESP_MSG.VERSION_1" xmlns:ns74="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETPRMPTTBLVAL_REQ.VERSION_1" xmlns:ns75="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETPRMPTTBLVAL_REQ_MSG.VERSION_1" xmlns:ns76="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETPRMPTTBLVAL_RESP.VERSION_1" xmlns:ns77="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETPRMPTTBLVAL_RESP_MSG.VERSION_1" xmlns:ns78="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_TREE_DETAILS_REQ_MSG.VERSION_1" xmlns:ns79="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_TREE_DETAILS_RESP_MSG.VERSION_1" xmlns:ns8="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_FIELD_PROPS_REQ_MSG.VERSION_1" xmlns:ns80="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_FIELDS_REQ_MSG.VERSION_1" xmlns:ns81="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_FIELDS_RESP_MSG.VERSION_1" xmlns:ns82="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:ns83="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_EXEQRY_ASYNC_REQ_MSG.VERSION_1" xmlns:ns84="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_GETQUERYRESULTS_RESP_MSG.VERSION_1" xmlns:ns85="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_LOGIN_REQ_MSG.VERSION_1" xmlns:ns86="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_EXEQRY_SYNC_REQ_MSG.VERSION_1" xmlns:ns87="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_EXEQRY_SYNCPOLL_REQ_MSG.VERSION_1" xmlns:ns9="http://xmlns.oracle.com/Enterprise/Tools/schemas/QAS_FIELD_PROPS_RESP_MSG.VERSION_1"><ns49:QAS_EXEQRY_SYNC_REQ><QueryName>ABSENCE_REASON_LOOKUP</QueryName><isConnectedQuery>N</isConnectedQuery><OwnerType>PUBLIC</OwnerType><BlockSizeKB>0</BlockSizeKB><MaxRow>100</MaxRow><OutResultType>XMLP</OutResultType><OutResultFormat>NONFILE</OutResultFormat></ns49:QAS_EXEQRY_SYNC_REQ></ns86:QAS_EXEQRY_SYNC_REQ_MSG></soap:Body></soap:Envelope>
--------------------------------------
Dec 22, 2010 11:44:50 AM org.apache.cxf.interceptor.AbstractLoggingInterceptor log
INFO: Inbound Message
----------------------------
ID: 1
Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml; charset=UTF-8
Headers: {content-type=[text/xml; charset=UTF-8], Date=[Wed, 22 Dec 2010 11:43:56 GMT], Content-Length=[672], X-Powered-By=[Servlet/2.5 JSP/2.1]}
Payload: <?xml version="1.0" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>null</faultstring><detail><IBResponse type="error" xmlns=""><DefaultTitle>Integration Broker Response</DefaultTitle><StatusCode>20</StatusCode><MessageID>554</MessageID><DefaultMessage><![CDATA[Encryption and Digital Signed or Https required for Service Operation QAS_EXECUTEQRYSYNC_OPER. (158,554)]]></DefaultMessage><MessageParameters><Parameter><![CDATA[QAS_EXECUTEQRYSYNC_OPER]]></Parameter></MessageParameters></IBResponse></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
--------------------------------------
2010-12-22 11:44:50,759 [main] ERROR com.succeed.peoplesoft.soap.PeopleSoftQueryService - Error: <detail><IBResponse type="error" xmlns=""><DefaultTitle>Integration Broker Response</DefaultTitle><StatusCode>20</StatusCode><MessageID>554</MessageID><DefaultMessage><![CDATA[Encryption and Digital Signed or Https required for Service Operation QAS_EXECUTEQRYSYNC_OPER. (158,554)]]></DefaultMessage><MessageParameters><Parameter><![CDATA[QAS_EXECUTEQRYSYNC_OPER]]></Parameter></MessageParameters></IBResponse></detail>
javax.xml.ws.soap.SOAPFaultException: null
 at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
 at $Proxy42.qasEXECUTEQRYSYNCOPER(Unknown Source)
 at com.succeed.peoplesoft.soap.PeopleSoftQueryService.executeQuery(PeopleSoftQueryService.java:154)
 at com.succeed.peoplesoft.soap.PeopleSoftQueryService.main(PeopleSoftQueryService.java:188)
Caused by: org.apache.cxf.binding.soap.SoapFault: null
 at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)
 at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)
 at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
 at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:99)
 at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
 at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
 at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2330)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2192)
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2036)
 at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
 at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
 at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
 at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:696)
 at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
 at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
 at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
 at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
 ... 3 more

I've checked and JuiCE is a dormant Apache Incubator project. I've got the full CXF library in my classpath too, so I'm not sure why it's trying to load this class. I suspect, but don't know, that it's what is causing it to revert to HTTP (192.168.1.91 is the IP address that HR91DMO resolves to, by the way).

I want to use Java configuration and not Spring configuration for this right now, partly because I want to understand what's going on and simplify the example, and partly because some of the config might be at runtime and I don't want to have to recompile a WAR with a new Spring config file each time there's a change.

Can anyone shed some light on what I'm doing wrong?

Luke Woodward
  • 63,336
  • 16
  • 89
  • 104
Mick Sear
  • 1,549
  • 15
  • 25

1 Answers1

2

I resolved this - it was still using the endpoint URL from the WSDL, when I thought I was overriding it. I did this:

BindingProvider provider = (BindingProvider)port;
provider.getRequestContext().put( BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpoint);

which I worked out from: http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html

There were 3 different ways listed for overriding the address.

Mick Sear
  • 1,549
  • 15
  • 25