Hi, first time poster!

Below is the stack trace, I can send the complete Test.java and 
PasswordHandler.java or the entire code as a zip
When I added the authentication below: the 'Forbidden' error disappeared.


@WebService(serviceName = "incentiveService", targetNamespace = 
"http://ciss.gm.com/service/incentive";, endpointInterface = 
"com.gm.ciss.service.incentive.incentiveServiceSOAPSOAP11Document_vims_incentiveService")
public class Test {

        public static void main(String[] args) {

                try {

                        incentiveServiceClient c = new incentiveServiceClient();
                        
                        
incentiveServiceSOAPSOAP11Document_vims_incentiveService service = 
c.getincentiveServiceSOAPSOAP11Document_vims_incentiveService("https://gmservices.gm.com:443/vims/incentiveService";);


Client client = Client.getInstance(service);
                
client.addOutHandler(new DOMOutHandler());
Properties outProperties = new Properties();

outProperties.setProperty(WSHandlerConstants.ACTION, 
WSHandlerConstants.USERNAME_TOKEN);
// Password type : plain text
outProperties.setProperty(WSHandlerConstants.PASSWORD_TYPE, 
WSConstants.PW_TEXT);

outProperties.setProperty(WSHandlerConstants.USER, "test");

outProperties.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, 
PasswordHandler.class.getName());
                
client.addOutHandler(new WSS4JOutHandler(outProperties));

The handler class:

import java.io.IOException;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import org.apache.ws.security.WSPasswordCallback;

public class PasswordHandler implements CallbackHandler {

    public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {

        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];

        // set the password for our message.
        pc.setPassword("test");
    }

}


Jul 21, 2008 9:57:12 AM org.apache.commons.httpclient.HttpMethodBase 
getResponseContentLength
WARNING: Multiple content-length headers detected
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested 
exception is org.codehaus.xfire.fault.XFireFault: Service specific exception: 
com.gm.ciss.service.incentive.exception.CISSPublishingServiceException
org.codehaus.xfire.fault.XFireFault: Service specific exception: 
com.gm.ciss.service.incentive.exception.CISSPublishingServiceException
        at 
org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
        at 
org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
        at 
org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
        at 
org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
        at 
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
        at 
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
        at 
org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
        at 
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
        at 
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
        at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
        at org.codehaus.xfire.client.Client.invoke(Client.java:336)
        at 
org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
        at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
        at $Proxy12.getOffer(Unknown Source)
        at com.digitas.Test.main(Test.java:202)


Any help would be much appreciated.

This is a service behind ssl with plaintext wss security token expected.

Works fine with soapui in eclipse just not xfire generated stubs.

I could be doing something really simplle wrong

Thanks!

Menachem (mendy) Glazer | Senior Software Engineer | Prodigious Worldwide
400 Renaissance Center | Suite 1500 | Detroit, MI 48243
Office: 313 394 2631 | Fax: 313 394 4505 |
Mobile: 248 535 7116 | Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
www.prodigiousworldwide.com 
 
A subsidiary of Digitas, a member of the Paris-based Publicis Groupe S.A. 
(Euronext Paris:  FR0000130577, NYSE: PUB), the world's fourth largest 
communications group and second largest media counsel and buying group. 

The information in this email and subsequent attachments may contain legally 
privileged, proprietary and confidential information that is intended for a 
particular recipient.  If you are not the intended recipient, you are hereby 
notified that any disclosure, copying, distribution, retention or use of the 
contents of this email information is prohibited.  When addressed to Prodigious 
Worldwide clients or vendors, any information contained in this email is 
subject to the terms and conditions in the governing contract.  If you have 
received this email in error, please immediately notify us by telephone or by 
return email, and delete the email. 

 <<Menachem Glazer.vcf>> 
BEGIN:VCARD
VERSION:2.1
N:Glazer;Menachem
FN:Menachem Glazer
ORG:Prodigious;Technology Enablement
TITLE:Sr Software Engineer
TEL;WORK;VOICE:313.394.2631
ADR;WORK:;Detroit;400 Renaissance Center;Detroit;Michigan;48243;UNITED STATES
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Detroit=0D=0A400 Renaissance Center=0D=0ADetroit, Michigan 48243=0D=0AUNITED=
 STATES
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20080605T024732Z
END:VCARD
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to