I got it out, but was really weird (almost for me).

I try a brute force approach, I put of all the annotations, living only
namespaces related annotations and @webservice. I generate the wsdl and then
the client. I copied the generated class in the server and the rebuild the
wsdl. Here come the "fun",  when I try to use WSDLToJava here comes out the
problem. The service parameter were named all the same and this is illegal. 
I rename the parameter and all goes well.
Now I don't still know where is the problem.

1) Something wrong with the generated class, but I don't think so or more
people will hit this problem.
2) Was the parameter issue. But in this case the JavaToWS class should have
pointed it out. I understand that somebody inside soap will never do such an
error, but not everybody is pro soap developer.

This is what I think, maybe I'm wrong, but above is how the story goes.

I'll really like if someone point out the problem as now I know how to solve
but not why the problem was present.

Thanks, really thanks for the time you spent in helping me, Benson.

Giulio




Benson Margulies-4 wrote:
> 
> I'm shooting in the dark. Could you possibly have failed to carry
> \all/ the generated code into the client?
> 
> This business has the general air about it of a namespace
> qualification issue, which could result from a missing
> package-info.class file on one side or the other.
> 
> On Mon, Nov 3, 2008 at 4:02 AM, JuliusIT <[EMAIL PROTECTED]> wrote:
>>
>> Here is my client, some added things for security and encryption, but the
>> null point error was previous to that, so they cannot be the cause:
>>
>>        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>>        factory.getInInterceptors().add(new LoggingInInterceptor());
>>        factory.getOutInterceptors().add(new LoggingOutInterceptor());
>>        factory.setServiceClass(TestSoap.class);
>>        factory.setAddress("http://localhost:9090/SoapPort";);
>>        TestSoap client = (TestSoap) factory.create();
>>        org.apache.cxf.endpoint.Client cxfClient =
>> org.apache.cxf.frontend.ClientProxy.getClient(client);
>>        org.apache.cxf.endpoint.Endpoint cxfEndpoint =
>> cxfClient.getEndpoint();
>>        Map<String,Object> outProps = new HashMap<String,Object>();
>>        WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
>>
>>        cxfEndpoint.getOutInterceptors().add(wssOut);
>>        outProps.put("mtom-enabled", Boolean.TRUE);
>>        outProps.put(WSHandlerConstants.ACTION,
>> WSHandlerConstants.USERNAME_TOKEN);
>>        //outProps.put(WSHandlerConstants.ACTION,
>> WSHandlerConstants.ENCRYPT);
>>            //outProps.put(WSHandlerConstants.ACTION,
>> WSHandlerConstants.SIGNATURE);
>>            //outProps.put(WSHandlerConstants.ACTION,
>> WSHandlerConstants.USERNAME_TOKEN + WSHandlerConstants.TIMESTAMP + " " +
>> WSHandlerConstants.SIGNATURE + " " + WSHandlerConstants.ENCRYPT);
>>
>>        outProps.put(WSHandlerConstants.USER, "joe");
>>
>>        outProps.put(WSHandlerConstants.PASSWORD_TYPE,
>> WSConstants.PW_TEXT);
>>            outProps.put(WSHandlerConstants.PW_CALLBACK_CLASS,
>> ClientPasswordCallback.class.getName());
>>
>>            //outProps.put(WSHandlerConstants.SIG_PROP_FILE,
>> "client_sign.properties");
>>
>> //outProps.put(WSHandlerConstants.ENC_PROP_FILE,"client_sign.properties");
>>
>>
>>
>> Benson Margulies-4 wrote:
>>>
>>> Sadly, your old code should have worked, and there is a way to turn on
>>> logging there via properties. The 'publish' API is JAX-WS. My concern
>>> was that you were using the SimpleServiceFactoryBean. Let's see what
>>> you've got on the client.
>>>
>>> On Sun, Nov 2, 2008 at 7:41 AM, JuliusIT <[EMAIL PROTECTED]> wrote:
>>>>
>>>>
>>>> Benson Margulies-4 wrote:
>>>>>
>>>>> This doesn't show me how you run the service, just how you generated
>>>>> the code. Have you looked at the examples?
>>>>>
>>>>> I need to know how you start your endpoint.
>>>>>
>>>>> Have you read:
>>>>>
>>>>> http://cwiki.apache.org/CXF20DOC/a-simple-jax-ws-service.html
>>>>>
>>>>> particularly look for the heading 'Publishing a Service'.
>>>>>
>>>>>
>>>>>
>>>>
>>>> This is how i runned it (like the example, i follow that part, maybe is
>>>> to
>>>> small for what I need).
>>>>
>>>>    protected TestSoapServiceServer() throws Exception {
>>>>        Object implementor = new TestSoapServiceImplementation();
>>>>        String address = "http://localhost:9090/SoapPort";;
>>>>        Endpoint.publish(address, implementor);
>>>>    }
>>>>
>>>> Thanks to you I changed to
>>>>
>>>>        DerwidSoapServiceImplementation implementor = new
>>>> DerwidSoapServiceImplementation();
>>>>        JaxWsServerFactoryBean svrFactory = new
>>>> JaxWsServerFactoryBean();
>>>>        svrFactory.setServiceClass(DerwidSoapService.class);
>>>>        svrFactory.setAddress("http://localhost:9090/SoapPort";);
>>>>        svrFactory.setServiceBean(implementor);
>>>>        svrFactory.getInInterceptors().add(new LoggingInInterceptor());
>>>>        svrFactory.getOutInterceptors().add(new
>>>> LoggingOutInterceptor());
>>>>        svrFactory.create();
>>>>
>>>> so now I can supply my server logging (as I should have done from the
>>>> beginning...)
>>>>
>>>>
>>>> 2-nov-2008 13.35.04 org.apache.cxf.interceptor.LoggingInInterceptor
>>>> logging
>>>> INFO: Inbound Message
>>>> ----------------------------
>>>> Encoding: UTF-8
>>>> Headers: {content-type=[text/xml; charset=UTF-8],
>>>> connection=[keep-alive],
>>>> transfer-encoding=[chunked], Host=[localhost:9090], SOAPAction=[""],
>>>> User-Agent=[Java/1.6.0_07], Accept=[*], Pragma=[no-cache],
>>>> Cache-Control=[no-cache]}
>>>> Messages:
>>>> Message:
>>>>
>>>> Payload: <soap:Envelope
>>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns2:TestSendFile
>>>> xmlns:ns2="http://soap.test.xyz.com/";><data>dGVzdG9kaXByb3Zh</data><encoding>BASE64</encoding><fileName>testfile</fileName><format>TXT</format><password>testpass</password><user>test</user></ns2:TestSendFile></soap:Body></soap:Envelope>
>>>> --------------------------------------
>>>> 2-nov-2008 13.35.04
>>>> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback
>>>> onClose
>>>> INFO: Outbound Message
>>>> ---------------------------
>>>> Encoding: UTF-8
>>>> Headers: {SOAPAction=[""]}
>>>> Messages:
>>>> Payload: <soap:Envelope
>>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns2:TestSendFileResponse
>>>> xmlns:ns2="http://soap.test.xyz.com/";><code>0</code></ns2:TestSendFileResponse></soap:Body></soap:Envelope>
>>>>
>>>> As I can see the incoming soap message are correct but the response
>>>> not,
>>>> should be some code error with message. I can't understand. I know this
>>>> should be a unqualified/qualified issue, but I can't understand where
>>>> is
>>>> the
>>>> problem, maybe is how i initialize the client. I'll also check it
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Null-parameter-in-request-and-response-tp20255751p20289413.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Null-parameter-in-request-and-response-tp20255751p20299222.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Null-parameter-in-request-and-response-tp20255751p20305918.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to