You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by ja...@external.t-mobile.at on 2008/05/07 10:54:34 UTC

empty soap action using JAXWS/JAXB [Virus checked]

Hello,

i'm using following code to obtain client proxy (some comments in code)


                JaxWsProxyFactoryBean factory = new 
JaxWsProxyFactoryBean();
                factory.setServiceClass(serviceInterface); // here is 
wsdl2java generated port interface (which contains soapaction="default")
                factory.setAddress(address); // service provider endpoint
                factory.setWsdlLocation(wsdlLocation); // in form 
classpath:xx.wsdl
                factory.setServiceName(QName.valueOf(serviceName)); // 
from wsdl
                factory.setProperties(new HashMap<String, Object>());
                factory.getProperties().put("schema-validation-enabled", 
new Boolean(schemaValidationEnabled)); // true
                T port = (T) factory.create();

i'm using cxf 2.1

during initialization it takes buildServiceFromWSDL path in 
ReflectionServiceFactoryBean

during this path, it never invoked line like o.setProperty("action", 
getAction(o, method));
which results in missing (empty) soap action .... which doesn't work for 
system i want to call.

Am I doing something wrongly? Or did i miss something?

I see it as a bug and fix seems to be to add missing magic line into 
initializeWSDLOperation of JaxWsServiceFactoryBean class. There are more 
places which are good enough for me, but i don't know which is the best in 
general.

best regards
jano

Antwort: Re: Antwort: Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by ja...@external.t-mobile.at.
Hello Dan,

with setting correct endpointName it works ;)

thanks for help.

best regards
jano




Daniel Kulp <dk...@apache.org> 
05/14/2008 23:37
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: Antwort: Re: Antwort: Re: Antwort: Re: empty soap action using 
JAXWS/JAXB [Virus checked]







On May 14, 2008, at 5:34 PM, jan.minaroviech@external.t-mobile.at wrote:

> Hello Daniel,
>
> thanks for quick answer.
> hopefully i'll find more time for debuging tomorow.
> but now i want to try the trick with setting also endpoint and also 
> to use
> generated service object.
>
> "actually, you aren't setting an endpointName/portName on the 
> factory)"
> do you mean factory.setEndpointName() with qname of port from wsdl? Or
> something more or different?

Yep.  That exactly.   The port name from the wsdl.

Dan


>
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/14/2008 23:23
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB 
> [Virus
> checked]
>
>
>
>
>
>
>
> jano,
>
> We might be getting someplace.   Thanks for doing some debugging.  I
> hope you're learning some stuff while doing it.  :-)
>
> My main concern is the fact that you are even hitting lines
> 131/107/202.   For a pure wsdl first case with valid values for the
> ServiceName/PortName that match the values in the wsdl, that code
> should never be reached.   (actually, you aren't setting an
> endpointName/portName on the factory)
>
> Actually, that looks like it....   Looking at the code, if it cannot
> find an endpoint of the given name (you aren't giving it one, so it's
> creating a default one that might now mathc the wsdl), it creates a
> new endpoint with a new binding.
>
>
> Can you get the stack trace at that point?    That might help figure
> out what is going on.
>
>
> Actually, can you also try using the generated Service object to
> create the proxy instead of the JaxWsProxyFactoryBean?    If that
> works, then I at least know there is something "different" between the
> two and would be another place to start looking.
>
> Dan
>
>
>
>
>
> On May 14, 2008, at 4:42 PM, jan.minaroviech@external.t-mobile.at 
> wrote:
>> on return from
>> public BindingInfo createBindingInfo(ServiceInfo service,
>> javax.wsdl.Binding binding, String ns) {
>> result contains operation with BindingOperationInfo with two
>> extensors -
>> one SOAPOperationImpl with soapActionUri set to "default" and one
>> SoapOperationInfo wiht action="default" (looks fine for me)
>>
>> then on the line 202: 
>> soapOperation.setSoapActionURI(soi.getAction());
>> return empty string, which seems to be incorrect
>>
>>
>> ok .. step back...
>> on line 107: public BindingInfo createBindingInfo(ServiceInfo si,
>> String
>> bindingid, Object conf) {
>> variable "si" contains somewhere inside still correct soap action.
>> created instance stored in "info" variable doesn't
>> in fact also Operation info fetched on line 131: for (OperationInfo
>> op :
>> si.getInterface().getOperations()) { doesn't contain required
>> informations
>> .....
>> in fact "si"  variable contains the same operation twice .. once
>> somewhere
>> in bindings[0].operations and second in intf.operations .... for 
>> later
>> there is not soap action (i mean no extensors .. maybe this is a
>> problem?)
>>
>> now i'm a bit lost in unknown code :( but hopefully i helped you a 
>> bit
>>
>> best regards
>> jano
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>> 05/13/2008 20:25
>> Bitte antworten an
>> users@cxf.apache.org
>>
>>
>> An
>> users@cxf.apache.org
>> Kopie
>>
>> Thema
>> Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>
>>
>>
>>
>>
>>
>>
>> I think I'm going to need a test case that shows this.   I just did
>> some wireshark traces on a bunch of tests and they are all sending 
>> the
>> SOAPAction properly.   There are a bunch of things that would break 
>> if
>> this wasn't true such as the tck, ws-addressing interop, etc....
>>
>> For the wsdl first stuff, the soapAction should be pulled from the
>> WSDL while processing the operations.   Specifically, line 540 of the
>> SoapBindingFactory.java. That should be grabbing the stuff from the
>> wsdl extensor and creating the appropriate thing we need.
>>
>>
>> Dan
>>
>>
>>
>> On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at
>> wrote:
>>
>>> Hi,
>>>
>>>
>>> wsdls says that soap action is "default" but on the wire it's 
>>> sending
>>> nothing.
>>>
>>> fragment of wsdl
>>> <wsdl:binding name='getBrandServiceOperationsBinding'
>>> type='tns:getBrandServiceOperations'>
>>> <soap:binding style='document'
>>> transport='http://schemas.xmlsoap.org/soap/http'/>
>>> <wsdl:operation name='getBrandService'>
>>> <soap:operation soapAction='default'/>
>>> <wsdl:input>
>>>  <soap:body use='literal'/>
>>> </wsdl:input>
>>> <wsdl:output>
>>>  <soap:body use='literal'/>
>>> </wsdl:output>
>>> <wsdl:fault name='TechnicalExceptionFault'>
>>>  <soap:fault name='TechnicalExceptionFault' use='literal'/>
>>> </wsdl:fault>
>>> </wsdl:operation>
>>> </wsdl:binding>
>>>
>>> i didn't find in sources a place, where action is set except the
>>> place,
>>> which is reading action from annotations.
>>>
>>> best regards
>>> jano
>>>
>>>
>>>
>>>
>>> Daniel Kulp <dk...@apache.org>
>>> 05/13/2008 04:34
>>> Bitte antworten an
>>> users@cxf.apache.org
>>>
>>>
>>> An
>>> users@cxf.apache.org
>>> Kopie
>>>
>>> Thema
>>> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> What does the wsdl say for the action field on the operations?
>>>
>>> If you create a service from the wsdl, the wsdl is the definitive
>>> contract and is what we use to determine the soap action, not the
>>> annotations.
>>>
>>> Dan
>>>
>>>
>>> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> i'm using following code to obtain client proxy (some comments in
>>>> code)
>>>>
>>>>
>>>>             JaxWsProxyFactoryBean factory = new
>>>> JaxWsProxyFactoryBean();
>>>>             factory.setServiceClass(serviceInterface); // here is
>>>> wsdl2java generated port interface (which contains
>>>> soapaction="default")
>>>>             factory.setAddress(address); // service provider
>>>> endpoint
>>>>             factory.setWsdlLocation(wsdlLocation); // in form
>>>> classpath:xx.wsdl
>>>>             factory.setServiceName(QName.valueOf(serviceName)); //
>>>> from wsdl
>>>>             factory.setProperties(new HashMap<String, Object>());
>>>>             factory.getProperties().put("schema-validation-
>>>> enabled",
>>>> new Boolean(schemaValidationEnabled)); // true
>>>>             T port = (T) factory.create();
>>>>
>>>> i'm using cxf 2.1
>>>>
>>>> during initialization it takes buildServiceFromWSDL path in
>>>> ReflectionServiceFactoryBean
>>>>
>>>> during this path, it never invoked line like 
>>>> o.setProperty("action",
>>>> getAction(o, method));
>>>> which results in missing (empty) soap action .... which doesn't 
>>>> work
>>>> for
>>>> system i want to call.
>>>>
>>>> Am I doing something wrongly? Or did i miss something?
>>>>
>>>> I see it as a bug and fix seems to be to add missing magic line 
>>>> into
>>>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are
>>>> more
>>>> places which are good enough for me, but i don't know which is the
>>>> best in
>>>> general.
>>>>
>>>> best regards
>>>> jano
>>>
>>> ---
>>> Daniel Kulp
>>> dkulp@apache.org
>>> http://www.dankulp.com/blog
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>>
>>
>>
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog








Antwort: Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by ja...@external.t-mobile.at.
Hello,

generated by wsdl2java:

@WebService(targetNamespace = 
"http://lookup.crm.tmobile.at/services/tmservicetemplate", name = 
"getTmServiceTemplatePort")
@XmlSeeAlso({ObjectFactory.class,at.tmobile.crm.lookup.tmservicetemplate.dto.cxf.ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)

public interface GetTmServiceTemplatePort {

    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
    @WebResult(name = "getTmServiceTemplateResponse", targetNamespace = 
"http://lookup.crm.tmobile.at/services/tmservicetemplate", partName = 
"parameters")
    @WebMethod
    public 
at.tmobile.crm.lookup.tmservicetemplate.dto.cxf.GetTmServiceTemplateResponse 
getTmServiceTemplate(
        @WebParam(partName = "parameters", name = "getTmServiceTemplate", 
targetNamespace = 
"http://lookup.crm.tmobile.at/services/tmservicetemplate")
 
at.tmobile.crm.lookup.tmservicetemplate.dto.cxf.GetTmServiceTemplateRequest 
parameters
    ) throws TechnicalExceptionMessage;
}

on implementation of this interface i don't have any annotations or other 
stuff.

i don't see annotation which is saying something about port .. it's only 
about portType.
Also yesterday when we were solving client proxy from 
jaxWsClientProxyFactory i first tried to set qname of portType and it was 
wrong. Correct was to set qname of port (under wsdl:service element).
So in my opinion annotations could not help much also in this case.

that's why the second possibility looks to be more probable for me.

best regards
jano




Daniel Kulp <dk...@apache.org> 
05/15/2008 17:59
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: empty soap action using JAXWS/JAXB [Virus checked]







What does the @WebService annotation look like in this case?  Also, 
the default generated from the class name might be adequate for this 
case.  Since your implementer class is GetTmServiceTemplatePort, that 
would be the default portname which might just match what's in the 
wsdl.   Don't really know.

The other possiblility:  a LONG LONG time ago, we talked about making 
it so that in a wsdl first scenario, if the given service only has a 
single port, it would use it if the endpoint name is null.   We MAY 
have only gotten that working on the server side, but I'm not sure. 
It might not be working at all and the above applies.  Or possibly we 
had to disable it on the client side for tck reasons or something. 
I'd definitely have to dig more for that.

Dan



On May 14, 2008, at 6:03 PM, jan.minaroviech@external.t-mobile.at wrote:
> Hi Dan,
>
> in this case endpointName is missing also here, isn't it? But 
> everything
> seems to work in this case
>
>        <jaxws:endpoint
>                id="endpoint-GetTmServiceTemplatePort"
>                implementor="#at.....GetTmServiceTemplatePort"
>                implementorClass="at.....GetTmServiceTemplatePort"
>                address="/at-lookup-tmservicetemplate-1.0"
>                wsdlLocation=
> "classpath:repository/at-lookup-tmservicetemplate-1.0/at-lookup- 
> tmservicetemplate-1.0.wsdl"
>                serviceName="serNs:getTmServiceTemplatePortService"
>                xmlns:serNs="http://..../tmservicetemplate"
>>
>                <jaxws:properties>
>                        <entry key="schema-validation-enabled" value=
> "true" />
>                </jaxws:properties>
>        </jaxws:endpoint>
>
> thanks.
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/14/2008 23:37
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Antwort: Re: Antwort: Re: Antwort: Re: empty soap action using
> JAXWS/JAXB [Virus checked]
>
>
>
>
>
>
>
> On May 14, 2008, at 5:34 PM, jan.minaroviech@external.t-mobile.at 
> wrote:
>
>> Hello Daniel,
>>
>> thanks for quick answer.
>> hopefully i'll find more time for debuging tomorow.
>> but now i want to try the trick with setting also endpoint and also
>> to use
>> generated service object.
>>
>> "actually, you aren't setting an endpointName/portName on the
>> factory)"
>> do you mean factory.setEndpointName() with qname of port from wsdl? 
>> Or
>> something more or different?
>
> Yep.  That exactly.   The port name from the wsdl.
>
> Dan
>
>
>>
>>
>> best regards
>> jano
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>> 05/14/2008 23:23
>> Bitte antworten an
>> users@cxf.apache.org
>>
>>
>> An
>> users@cxf.apache.org
>> Kopie
>>
>> Thema
>> Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB
>> [Virus
>> checked]
>>
>>
>>
>>
>>
>>
>>
>> jano,
>>
>> We might be getting someplace.   Thanks for doing some debugging.  I
>> hope you're learning some stuff while doing it.  :-)
>>
>> My main concern is the fact that you are even hitting lines
>> 131/107/202.   For a pure wsdl first case with valid values for the
>> ServiceName/PortName that match the values in the wsdl, that code
>> should never be reached.   (actually, you aren't setting an
>> endpointName/portName on the factory)
>>
>> Actually, that looks like it....   Looking at the code, if it cannot
>> find an endpoint of the given name (you aren't giving it one, so it's
>> creating a default one that might now mathc the wsdl), it creates a
>> new endpoint with a new binding.
>>
>>
>> Can you get the stack trace at that point?    That might help figure
>> out what is going on.
>>
>>
>> Actually, can you also try using the generated Service object to
>> create the proxy instead of the JaxWsProxyFactoryBean?    If that
>> works, then I at least know there is something "different" between 
>> the
>> two and would be another place to start looking.
>>
>> Dan
>>
>>
>>
>>
>>
>> On May 14, 2008, at 4:42 PM, jan.minaroviech@external.t-mobile.at
>> wrote:
>>> on return from
>>> public BindingInfo createBindingInfo(ServiceInfo service,
>>> javax.wsdl.Binding binding, String ns) {
>>> result contains operation with BindingOperationInfo with two
>>> extensors -
>>> one SOAPOperationImpl with soapActionUri set to "default" and one
>>> SoapOperationInfo wiht action="default" (looks fine for me)
>>>
>>> then on the line 202:
>>> soapOperation.setSoapActionURI(soi.getAction());
>>> return empty string, which seems to be incorrect
>>>
>>>
>>> ok .. step back...
>>> on line 107: public BindingInfo createBindingInfo(ServiceInfo si,
>>> String
>>> bindingid, Object conf) {
>>> variable "si" contains somewhere inside still correct soap action.
>>> created instance stored in "info" variable doesn't
>>> in fact also Operation info fetched on line 131: for (OperationInfo
>>> op :
>>> si.getInterface().getOperations()) { doesn't contain required
>>> informations
>>> .....
>>> in fact "si"  variable contains the same operation twice .. once
>>> somewhere
>>> in bindings[0].operations and second in intf.operations .... for
>>> later
>>> there is not soap action (i mean no extensors .. maybe this is a
>>> problem?)
>>>
>>> now i'm a bit lost in unknown code :( but hopefully i helped you a
>>> bit
>>>
>>> best regards
>>> jano
>>>
>>>
>>>
>>>
>>> Daniel Kulp <dk...@apache.org>
>>> 05/13/2008 20:25
>>> Bitte antworten an
>>> users@cxf.apache.org
>>>
>>>
>>> An
>>> users@cxf.apache.org
>>> Kopie
>>>
>>> Thema
>>> Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I think I'm going to need a test case that shows this.   I just did
>>> some wireshark traces on a bunch of tests and they are all sending
>>> the
>>> SOAPAction properly.   There are a bunch of things that would break
>>> if
>>> this wasn't true such as the tck, ws-addressing interop, etc....
>>>
>>> For the wsdl first stuff, the soapAction should be pulled from the
>>> WSDL while processing the operations.   Specifically, line 540 of 
>>> the
>>> SoapBindingFactory.java. That should be grabbing the stuff from the
>>> wsdl extensor and creating the appropriate thing we need.
>>>
>>>
>>> Dan
>>>
>>>
>>>
>>> On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>>
>>>> wsdls says that soap action is "default" but on the wire it's
>>>> sending
>>>> nothing.
>>>>
>>>> fragment of wsdl
>>>> <wsdl:binding name='getBrandServiceOperationsBinding'
>>>> type='tns:getBrandServiceOperations'>
>>>> <soap:binding style='document'
>>>> transport='http://schemas.xmlsoap.org/soap/http'/>
>>>> <wsdl:operation name='getBrandService'>
>>>> <soap:operation soapAction='default'/>
>>>> <wsdl:input>
>>>> <soap:body use='literal'/>
>>>> </wsdl:input>
>>>> <wsdl:output>
>>>> <soap:body use='literal'/>
>>>> </wsdl:output>
>>>> <wsdl:fault name='TechnicalExceptionFault'>
>>>> <soap:fault name='TechnicalExceptionFault' use='literal'/>
>>>> </wsdl:fault>
>>>> </wsdl:operation>
>>>> </wsdl:binding>
>>>>
>>>> i didn't find in sources a place, where action is set except the
>>>> place,
>>>> which is reading action from annotations.
>>>>
>>>> best regards
>>>> jano
>>>>
>>>>
>>>>
>>>>
>>>> Daniel Kulp <dk...@apache.org>
>>>> 05/13/2008 04:34
>>>> Bitte antworten an
>>>> users@cxf.apache.org
>>>>
>>>>
>>>> An
>>>> users@cxf.apache.org
>>>> Kopie
>>>>
>>>> Thema
>>>> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> What does the wsdl say for the action field on the operations?
>>>>
>>>> If you create a service from the wsdl, the wsdl is the definitive
>>>> contract and is what we use to determine the soap action, not the
>>>> annotations.
>>>>
>>>> Dan
>>>>
>>>>
>>>> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> i'm using following code to obtain client proxy (some comments in
>>>>> code)
>>>>>
>>>>>
>>>>>            JaxWsProxyFactoryBean factory = new
>>>>> JaxWsProxyFactoryBean();
>>>>>            factory.setServiceClass(serviceInterface); // here is
>>>>> wsdl2java generated port interface (which contains
>>>>> soapaction="default")
>>>>>            factory.setAddress(address); // service provider
>>>>> endpoint
>>>>>            factory.setWsdlLocation(wsdlLocation); // in form
>>>>> classpath:xx.wsdl
>>>>>            factory.setServiceName(QName.valueOf(serviceName)); //
>>>>> from wsdl
>>>>>            factory.setProperties(new HashMap<String, Object>());
>>>>>            factory.getProperties().put("schema-validation-
>>>>> enabled",
>>>>> new Boolean(schemaValidationEnabled)); // true
>>>>>            T port = (T) factory.create();
>>>>>
>>>>> i'm using cxf 2.1
>>>>>
>>>>> during initialization it takes buildServiceFromWSDL path in
>>>>> ReflectionServiceFactoryBean
>>>>>
>>>>> during this path, it never invoked line like
>>>>> o.setProperty("action",
>>>>> getAction(o, method));
>>>>> which results in missing (empty) soap action .... which doesn't
>>>>> work
>>>>> for
>>>>> system i want to call.
>>>>>
>>>>> Am I doing something wrongly? Or did i miss something?
>>>>>
>>>>> I see it as a bug and fix seems to be to add missing magic line
>>>>> into
>>>>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There 
>>>>> are
>>>>> more
>>>>> places which are good enough for me, but i don't know which is the
>>>>> best in
>>>>> general.
>>>>>
>>>>> best regards
>>>>> jano
>>>>
>>>> ---
>>>> Daniel Kulp
>>>> dkulp@apache.org
>>>> http://www.dankulp.com/blog
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> ---
>>> Daniel Kulp
>>> dkulp@apache.org
>>> http://www.dankulp.com/blog
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>>
>>
>>
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog








Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by Daniel Kulp <dk...@apache.org>.
What does the @WebService annotation look like in this case?  Also,  
the default generated from the class name might be adequate for this  
case.  Since your implementer class is GetTmServiceTemplatePort, that  
would be the default portname which might just match what's in the  
wsdl.   Don't really know.

The other possiblility:  a LONG LONG time ago, we talked about making  
it so that in a wsdl first scenario, if the given service only has a  
single port, it would use it if the endpoint name is null.   We MAY  
have only gotten that working on the server side, but I'm not sure.    
It might not be working at all and the above applies.  Or possibly we  
had to disable it on the client side for tck reasons or something.    
I'd definitely have to dig more for that.

Dan



On May 14, 2008, at 6:03 PM, jan.minaroviech@external.t-mobile.at wrote:
> Hi Dan,
>
> in this case endpointName is missing also here, isn't it? But  
> everything
> seems to work in this case
>
>        <jaxws:endpoint
>                id="endpoint-GetTmServiceTemplatePort"
>                implementor="#at.....GetTmServiceTemplatePort"
>                implementorClass="at.....GetTmServiceTemplatePort"
>                address="/at-lookup-tmservicetemplate-1.0"
>                wsdlLocation=
> "classpath:repository/at-lookup-tmservicetemplate-1.0/at-lookup- 
> tmservicetemplate-1.0.wsdl"
>                serviceName="serNs:getTmServiceTemplatePortService"
>                xmlns:serNs="http://..../tmservicetemplate"
>>
>                <jaxws:properties>
>                        <entry key="schema-validation-enabled" value=
> "true" />
>                </jaxws:properties>
>        </jaxws:endpoint>
>
> thanks.
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/14/2008 23:37
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Antwort: Re: Antwort: Re: Antwort: Re: empty soap action using
> JAXWS/JAXB [Virus checked]
>
>
>
>
>
>
>
> On May 14, 2008, at 5:34 PM, jan.minaroviech@external.t-mobile.at  
> wrote:
>
>> Hello Daniel,
>>
>> thanks for quick answer.
>> hopefully i'll find more time for debuging tomorow.
>> but now i want to try the trick with setting also endpoint and also
>> to use
>> generated service object.
>>
>> "actually, you aren't setting an endpointName/portName on the
>> factory)"
>> do you mean factory.setEndpointName() with qname of port from wsdl?  
>> Or
>> something more or different?
>
> Yep.  That exactly.   The port name from the wsdl.
>
> Dan
>
>
>>
>>
>> best regards
>> jano
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>> 05/14/2008 23:23
>> Bitte antworten an
>> users@cxf.apache.org
>>
>>
>> An
>> users@cxf.apache.org
>> Kopie
>>
>> Thema
>> Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB
>> [Virus
>> checked]
>>
>>
>>
>>
>>
>>
>>
>> jano,
>>
>> We might be getting someplace.   Thanks for doing some debugging.  I
>> hope you're learning some stuff while doing it.  :-)
>>
>> My main concern is the fact that you are even hitting lines
>> 131/107/202.   For a pure wsdl first case with valid values for the
>> ServiceName/PortName that match the values in the wsdl, that code
>> should never be reached.   (actually, you aren't setting an
>> endpointName/portName on the factory)
>>
>> Actually, that looks like it....   Looking at the code, if it cannot
>> find an endpoint of the given name (you aren't giving it one, so it's
>> creating a default one that might now mathc the wsdl), it creates a
>> new endpoint with a new binding.
>>
>>
>> Can you get the stack trace at that point?    That might help figure
>> out what is going on.
>>
>>
>> Actually, can you also try using the generated Service object to
>> create the proxy instead of the JaxWsProxyFactoryBean?    If that
>> works, then I at least know there is something "different" between  
>> the
>> two and would be another place to start looking.
>>
>> Dan
>>
>>
>>
>>
>>
>> On May 14, 2008, at 4:42 PM, jan.minaroviech@external.t-mobile.at
>> wrote:
>>> on return from
>>> public BindingInfo createBindingInfo(ServiceInfo service,
>>> javax.wsdl.Binding binding, String ns) {
>>> result contains operation with BindingOperationInfo with two
>>> extensors -
>>> one SOAPOperationImpl with soapActionUri set to "default" and one
>>> SoapOperationInfo wiht action="default" (looks fine for me)
>>>
>>> then on the line 202:
>>> soapOperation.setSoapActionURI(soi.getAction());
>>> return empty string, which seems to be incorrect
>>>
>>>
>>> ok .. step back...
>>> on line 107: public BindingInfo createBindingInfo(ServiceInfo si,
>>> String
>>> bindingid, Object conf) {
>>> variable "si" contains somewhere inside still correct soap action.
>>> created instance stored in "info" variable doesn't
>>> in fact also Operation info fetched on line 131: for (OperationInfo
>>> op :
>>> si.getInterface().getOperations()) { doesn't contain required
>>> informations
>>> .....
>>> in fact "si"  variable contains the same operation twice .. once
>>> somewhere
>>> in bindings[0].operations and second in intf.operations .... for
>>> later
>>> there is not soap action (i mean no extensors .. maybe this is a
>>> problem?)
>>>
>>> now i'm a bit lost in unknown code :( but hopefully i helped you a
>>> bit
>>>
>>> best regards
>>> jano
>>>
>>>
>>>
>>>
>>> Daniel Kulp <dk...@apache.org>
>>> 05/13/2008 20:25
>>> Bitte antworten an
>>> users@cxf.apache.org
>>>
>>>
>>> An
>>> users@cxf.apache.org
>>> Kopie
>>>
>>> Thema
>>> Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I think I'm going to need a test case that shows this.   I just did
>>> some wireshark traces on a bunch of tests and they are all sending
>>> the
>>> SOAPAction properly.   There are a bunch of things that would break
>>> if
>>> this wasn't true such as the tck, ws-addressing interop, etc....
>>>
>>> For the wsdl first stuff, the soapAction should be pulled from the
>>> WSDL while processing the operations.   Specifically, line 540 of  
>>> the
>>> SoapBindingFactory.java. That should be grabbing the stuff from the
>>> wsdl extensor and creating the appropriate thing we need.
>>>
>>>
>>> Dan
>>>
>>>
>>>
>>> On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>>
>>>> wsdls says that soap action is "default" but on the wire it's
>>>> sending
>>>> nothing.
>>>>
>>>> fragment of wsdl
>>>> <wsdl:binding name='getBrandServiceOperationsBinding'
>>>> type='tns:getBrandServiceOperations'>
>>>> <soap:binding style='document'
>>>> transport='http://schemas.xmlsoap.org/soap/http'/>
>>>> <wsdl:operation name='getBrandService'>
>>>> <soap:operation soapAction='default'/>
>>>> <wsdl:input>
>>>> <soap:body use='literal'/>
>>>> </wsdl:input>
>>>> <wsdl:output>
>>>> <soap:body use='literal'/>
>>>> </wsdl:output>
>>>> <wsdl:fault name='TechnicalExceptionFault'>
>>>> <soap:fault name='TechnicalExceptionFault' use='literal'/>
>>>> </wsdl:fault>
>>>> </wsdl:operation>
>>>> </wsdl:binding>
>>>>
>>>> i didn't find in sources a place, where action is set except the
>>>> place,
>>>> which is reading action from annotations.
>>>>
>>>> best regards
>>>> jano
>>>>
>>>>
>>>>
>>>>
>>>> Daniel Kulp <dk...@apache.org>
>>>> 05/13/2008 04:34
>>>> Bitte antworten an
>>>> users@cxf.apache.org
>>>>
>>>>
>>>> An
>>>> users@cxf.apache.org
>>>> Kopie
>>>>
>>>> Thema
>>>> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> What does the wsdl say for the action field on the operations?
>>>>
>>>> If you create a service from the wsdl, the wsdl is the definitive
>>>> contract and is what we use to determine the soap action, not the
>>>> annotations.
>>>>
>>>> Dan
>>>>
>>>>
>>>> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> i'm using following code to obtain client proxy (some comments in
>>>>> code)
>>>>>
>>>>>
>>>>>            JaxWsProxyFactoryBean factory = new
>>>>> JaxWsProxyFactoryBean();
>>>>>            factory.setServiceClass(serviceInterface); // here is
>>>>> wsdl2java generated port interface (which contains
>>>>> soapaction="default")
>>>>>            factory.setAddress(address); // service provider
>>>>> endpoint
>>>>>            factory.setWsdlLocation(wsdlLocation); // in form
>>>>> classpath:xx.wsdl
>>>>>            factory.setServiceName(QName.valueOf(serviceName)); //
>>>>> from wsdl
>>>>>            factory.setProperties(new HashMap<String, Object>());
>>>>>            factory.getProperties().put("schema-validation-
>>>>> enabled",
>>>>> new Boolean(schemaValidationEnabled)); // true
>>>>>            T port = (T) factory.create();
>>>>>
>>>>> i'm using cxf 2.1
>>>>>
>>>>> during initialization it takes buildServiceFromWSDL path in
>>>>> ReflectionServiceFactoryBean
>>>>>
>>>>> during this path, it never invoked line like
>>>>> o.setProperty("action",
>>>>> getAction(o, method));
>>>>> which results in missing (empty) soap action .... which doesn't
>>>>> work
>>>>> for
>>>>> system i want to call.
>>>>>
>>>>> Am I doing something wrongly? Or did i miss something?
>>>>>
>>>>> I see it as a bug and fix seems to be to add missing magic line
>>>>> into
>>>>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There  
>>>>> are
>>>>> more
>>>>> places which are good enough for me, but i don't know which is the
>>>>> best in
>>>>> general.
>>>>>
>>>>> best regards
>>>>> jano
>>>>
>>>> ---
>>>> Daniel Kulp
>>>> dkulp@apache.org
>>>> http://www.dankulp.com/blog
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> ---
>>> Daniel Kulp
>>> dkulp@apache.org
>>> http://www.dankulp.com/blog
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>>
>>
>>
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by ja...@external.t-mobile.at.
Hi Dan,

in this case endpointName is missing also here, isn't it? But everything 
seems to work in this case

        <jaxws:endpoint
                id="endpoint-GetTmServiceTemplatePort"
                implementor="#at.....GetTmServiceTemplatePort"
                implementorClass="at.....GetTmServiceTemplatePort"
                address="/at-lookup-tmservicetemplate-1.0" 
                wsdlLocation=
"classpath:repository/at-lookup-tmservicetemplate-1.0/at-lookup-tmservicetemplate-1.0.wsdl"
                serviceName="serNs:getTmServiceTemplatePortService"
                xmlns:serNs="http://..../tmservicetemplate"
        >
                <jaxws:properties>
                        <entry key="schema-validation-enabled" value=
"true" />
                </jaxws:properties>
        </jaxws:endpoint>

thanks.

best regards
jano




Daniel Kulp <dk...@apache.org> 
05/14/2008 23:37
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: Antwort: Re: Antwort: Re: Antwort: Re: empty soap action using 
JAXWS/JAXB [Virus checked]







On May 14, 2008, at 5:34 PM, jan.minaroviech@external.t-mobile.at wrote:

> Hello Daniel,
>
> thanks for quick answer.
> hopefully i'll find more time for debuging tomorow.
> but now i want to try the trick with setting also endpoint and also 
> to use
> generated service object.
>
> "actually, you aren't setting an endpointName/portName on the 
> factory)"
> do you mean factory.setEndpointName() with qname of port from wsdl? Or
> something more or different?

Yep.  That exactly.   The port name from the wsdl.

Dan


>
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/14/2008 23:23
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB 
> [Virus
> checked]
>
>
>
>
>
>
>
> jano,
>
> We might be getting someplace.   Thanks for doing some debugging.  I
> hope you're learning some stuff while doing it.  :-)
>
> My main concern is the fact that you are even hitting lines
> 131/107/202.   For a pure wsdl first case with valid values for the
> ServiceName/PortName that match the values in the wsdl, that code
> should never be reached.   (actually, you aren't setting an
> endpointName/portName on the factory)
>
> Actually, that looks like it....   Looking at the code, if it cannot
> find an endpoint of the given name (you aren't giving it one, so it's
> creating a default one that might now mathc the wsdl), it creates a
> new endpoint with a new binding.
>
>
> Can you get the stack trace at that point?    That might help figure
> out what is going on.
>
>
> Actually, can you also try using the generated Service object to
> create the proxy instead of the JaxWsProxyFactoryBean?    If that
> works, then I at least know there is something "different" between the
> two and would be another place to start looking.
>
> Dan
>
>
>
>
>
> On May 14, 2008, at 4:42 PM, jan.minaroviech@external.t-mobile.at 
> wrote:
>> on return from
>> public BindingInfo createBindingInfo(ServiceInfo service,
>> javax.wsdl.Binding binding, String ns) {
>> result contains operation with BindingOperationInfo with two
>> extensors -
>> one SOAPOperationImpl with soapActionUri set to "default" and one
>> SoapOperationInfo wiht action="default" (looks fine for me)
>>
>> then on the line 202: 
>> soapOperation.setSoapActionURI(soi.getAction());
>> return empty string, which seems to be incorrect
>>
>>
>> ok .. step back...
>> on line 107: public BindingInfo createBindingInfo(ServiceInfo si,
>> String
>> bindingid, Object conf) {
>> variable "si" contains somewhere inside still correct soap action.
>> created instance stored in "info" variable doesn't
>> in fact also Operation info fetched on line 131: for (OperationInfo
>> op :
>> si.getInterface().getOperations()) { doesn't contain required
>> informations
>> .....
>> in fact "si"  variable contains the same operation twice .. once
>> somewhere
>> in bindings[0].operations and second in intf.operations .... for 
>> later
>> there is not soap action (i mean no extensors .. maybe this is a
>> problem?)
>>
>> now i'm a bit lost in unknown code :( but hopefully i helped you a 
>> bit
>>
>> best regards
>> jano
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>> 05/13/2008 20:25
>> Bitte antworten an
>> users@cxf.apache.org
>>
>>
>> An
>> users@cxf.apache.org
>> Kopie
>>
>> Thema
>> Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>
>>
>>
>>
>>
>>
>>
>> I think I'm going to need a test case that shows this.   I just did
>> some wireshark traces on a bunch of tests and they are all sending 
>> the
>> SOAPAction properly.   There are a bunch of things that would break 
>> if
>> this wasn't true such as the tck, ws-addressing interop, etc....
>>
>> For the wsdl first stuff, the soapAction should be pulled from the
>> WSDL while processing the operations.   Specifically, line 540 of the
>> SoapBindingFactory.java. That should be grabbing the stuff from the
>> wsdl extensor and creating the appropriate thing we need.
>>
>>
>> Dan
>>
>>
>>
>> On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at
>> wrote:
>>
>>> Hi,
>>>
>>>
>>> wsdls says that soap action is "default" but on the wire it's 
>>> sending
>>> nothing.
>>>
>>> fragment of wsdl
>>> <wsdl:binding name='getBrandServiceOperationsBinding'
>>> type='tns:getBrandServiceOperations'>
>>> <soap:binding style='document'
>>> transport='http://schemas.xmlsoap.org/soap/http'/>
>>> <wsdl:operation name='getBrandService'>
>>> <soap:operation soapAction='default'/>
>>> <wsdl:input>
>>>  <soap:body use='literal'/>
>>> </wsdl:input>
>>> <wsdl:output>
>>>  <soap:body use='literal'/>
>>> </wsdl:output>
>>> <wsdl:fault name='TechnicalExceptionFault'>
>>>  <soap:fault name='TechnicalExceptionFault' use='literal'/>
>>> </wsdl:fault>
>>> </wsdl:operation>
>>> </wsdl:binding>
>>>
>>> i didn't find in sources a place, where action is set except the
>>> place,
>>> which is reading action from annotations.
>>>
>>> best regards
>>> jano
>>>
>>>
>>>
>>>
>>> Daniel Kulp <dk...@apache.org>
>>> 05/13/2008 04:34
>>> Bitte antworten an
>>> users@cxf.apache.org
>>>
>>>
>>> An
>>> users@cxf.apache.org
>>> Kopie
>>>
>>> Thema
>>> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> What does the wsdl say for the action field on the operations?
>>>
>>> If you create a service from the wsdl, the wsdl is the definitive
>>> contract and is what we use to determine the soap action, not the
>>> annotations.
>>>
>>> Dan
>>>
>>>
>>> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> i'm using following code to obtain client proxy (some comments in
>>>> code)
>>>>
>>>>
>>>>             JaxWsProxyFactoryBean factory = new
>>>> JaxWsProxyFactoryBean();
>>>>             factory.setServiceClass(serviceInterface); // here is
>>>> wsdl2java generated port interface (which contains
>>>> soapaction="default")
>>>>             factory.setAddress(address); // service provider
>>>> endpoint
>>>>             factory.setWsdlLocation(wsdlLocation); // in form
>>>> classpath:xx.wsdl
>>>>             factory.setServiceName(QName.valueOf(serviceName)); //
>>>> from wsdl
>>>>             factory.setProperties(new HashMap<String, Object>());
>>>>             factory.getProperties().put("schema-validation-
>>>> enabled",
>>>> new Boolean(schemaValidationEnabled)); // true
>>>>             T port = (T) factory.create();
>>>>
>>>> i'm using cxf 2.1
>>>>
>>>> during initialization it takes buildServiceFromWSDL path in
>>>> ReflectionServiceFactoryBean
>>>>
>>>> during this path, it never invoked line like 
>>>> o.setProperty("action",
>>>> getAction(o, method));
>>>> which results in missing (empty) soap action .... which doesn't 
>>>> work
>>>> for
>>>> system i want to call.
>>>>
>>>> Am I doing something wrongly? Or did i miss something?
>>>>
>>>> I see it as a bug and fix seems to be to add missing magic line 
>>>> into
>>>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are
>>>> more
>>>> places which are good enough for me, but i don't know which is the
>>>> best in
>>>> general.
>>>>
>>>> best regards
>>>> jano
>>>
>>> ---
>>> Daniel Kulp
>>> dkulp@apache.org
>>> http://www.dankulp.com/blog
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>>
>>
>>
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog








Re: Antwort: Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by Daniel Kulp <dk...@apache.org>.
On May 14, 2008, at 5:34 PM, jan.minaroviech@external.t-mobile.at wrote:

> Hello Daniel,
>
> thanks for quick answer.
> hopefully i'll find more time for debuging tomorow.
> but now i want to try the trick with setting also endpoint and also  
> to use
> generated service object.
>
> "actually, you aren't setting an endpointName/portName on the  
> factory)"
> do you mean factory.setEndpointName() with qname of port from wsdl? Or
> something more or different?

Yep.  That exactly.   The port name from the wsdl.

Dan


>
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/14/2008 23:23
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB   
> [Virus
> checked]
>
>
>
>
>
>
>
> jano,
>
> We might be getting someplace.   Thanks for doing some debugging.  I
> hope you're learning some stuff while doing it.  :-)
>
> My main concern is the fact that you are even hitting lines
> 131/107/202.   For a pure wsdl first case with valid values for the
> ServiceName/PortName that match the values in the wsdl, that code
> should never be reached.   (actually, you aren't setting an
> endpointName/portName on the factory)
>
> Actually, that looks like it....   Looking at the code, if it cannot
> find an endpoint of the given name (you aren't giving it one, so it's
> creating a default one that might now mathc the wsdl), it creates a
> new endpoint with a new binding.
>
>
> Can you get the stack trace at that point?    That might help figure
> out what is going on.
>
>
> Actually, can you also try using the generated Service object to
> create the proxy instead of the JaxWsProxyFactoryBean?    If that
> works, then I at least know there is something "different" between the
> two and would be another place to start looking.
>
> Dan
>
>
>
>
>
> On May 14, 2008, at 4:42 PM, jan.minaroviech@external.t-mobile.at  
> wrote:
>> on return from
>> public BindingInfo createBindingInfo(ServiceInfo service,
>> javax.wsdl.Binding binding, String ns) {
>> result contains operation with BindingOperationInfo with two
>> extensors -
>> one SOAPOperationImpl with soapActionUri set to "default" and one
>> SoapOperationInfo wiht action="default" (looks fine for me)
>>
>> then on the line 202:  
>> soapOperation.setSoapActionURI(soi.getAction());
>> return empty string, which seems to be incorrect
>>
>>
>> ok .. step back...
>> on line 107: public BindingInfo createBindingInfo(ServiceInfo si,
>> String
>> bindingid, Object conf) {
>> variable "si" contains somewhere inside still correct soap action.
>> created instance stored in "info" variable doesn't
>> in fact also Operation info fetched on line 131: for (OperationInfo
>> op :
>> si.getInterface().getOperations()) { doesn't contain required
>> informations
>> .....
>> in fact "si"  variable contains the same operation twice .. once
>> somewhere
>> in bindings[0].operations and second in intf.operations .... for  
>> later
>> there is not soap action (i mean no extensors .. maybe this is a
>> problem?)
>>
>> now i'm a bit lost in unknown code :( but hopefully i helped you a  
>> bit
>>
>> best regards
>> jano
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>> 05/13/2008 20:25
>> Bitte antworten an
>> users@cxf.apache.org
>>
>>
>> An
>> users@cxf.apache.org
>> Kopie
>>
>> Thema
>> Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>
>>
>>
>>
>>
>>
>>
>> I think I'm going to need a test case that shows this.   I just did
>> some wireshark traces on a bunch of tests and they are all sending  
>> the
>> SOAPAction properly.   There are a bunch of things that would break  
>> if
>> this wasn't true such as the tck, ws-addressing interop, etc....
>>
>> For the wsdl first stuff, the soapAction should be pulled from the
>> WSDL while processing the operations.   Specifically, line 540 of the
>> SoapBindingFactory.java. That should be grabbing the stuff from the
>> wsdl extensor and creating the appropriate thing we need.
>>
>>
>> Dan
>>
>>
>>
>> On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at
>> wrote:
>>
>>> Hi,
>>>
>>>
>>> wsdls says that soap action is "default" but on the wire it's  
>>> sending
>>> nothing.
>>>
>>> fragment of wsdl
>>> <wsdl:binding name='getBrandServiceOperationsBinding'
>>> type='tns:getBrandServiceOperations'>
>>> <soap:binding style='document'
>>> transport='http://schemas.xmlsoap.org/soap/http'/>
>>> <wsdl:operation name='getBrandService'>
>>> <soap:operation soapAction='default'/>
>>> <wsdl:input>
>>>  <soap:body use='literal'/>
>>> </wsdl:input>
>>> <wsdl:output>
>>>  <soap:body use='literal'/>
>>> </wsdl:output>
>>> <wsdl:fault name='TechnicalExceptionFault'>
>>>  <soap:fault name='TechnicalExceptionFault' use='literal'/>
>>> </wsdl:fault>
>>> </wsdl:operation>
>>> </wsdl:binding>
>>>
>>> i didn't find in sources a place, where action is set except the
>>> place,
>>> which is reading action from annotations.
>>>
>>> best regards
>>> jano
>>>
>>>
>>>
>>>
>>> Daniel Kulp <dk...@apache.org>
>>> 05/13/2008 04:34
>>> Bitte antworten an
>>> users@cxf.apache.org
>>>
>>>
>>> An
>>> users@cxf.apache.org
>>> Kopie
>>>
>>> Thema
>>> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> What does the wsdl say for the action field on the operations?
>>>
>>> If you create a service from the wsdl, the wsdl is the definitive
>>> contract and is what we use to determine the soap action, not the
>>> annotations.
>>>
>>> Dan
>>>
>>>
>>> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> i'm using following code to obtain client proxy (some comments in
>>>> code)
>>>>
>>>>
>>>>             JaxWsProxyFactoryBean factory = new
>>>> JaxWsProxyFactoryBean();
>>>>             factory.setServiceClass(serviceInterface); // here is
>>>> wsdl2java generated port interface (which contains
>>>> soapaction="default")
>>>>             factory.setAddress(address); // service provider
>>>> endpoint
>>>>             factory.setWsdlLocation(wsdlLocation); // in form
>>>> classpath:xx.wsdl
>>>>             factory.setServiceName(QName.valueOf(serviceName)); //
>>>> from wsdl
>>>>             factory.setProperties(new HashMap<String, Object>());
>>>>             factory.getProperties().put("schema-validation-
>>>> enabled",
>>>> new Boolean(schemaValidationEnabled)); // true
>>>>             T port = (T) factory.create();
>>>>
>>>> i'm using cxf 2.1
>>>>
>>>> during initialization it takes buildServiceFromWSDL path in
>>>> ReflectionServiceFactoryBean
>>>>
>>>> during this path, it never invoked line like  
>>>> o.setProperty("action",
>>>> getAction(o, method));
>>>> which results in missing (empty) soap action .... which doesn't  
>>>> work
>>>> for
>>>> system i want to call.
>>>>
>>>> Am I doing something wrongly? Or did i miss something?
>>>>
>>>> I see it as a bug and fix seems to be to add missing magic line  
>>>> into
>>>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are
>>>> more
>>>> places which are good enough for me, but i don't know which is the
>>>> best in
>>>> general.
>>>>
>>>> best regards
>>>> jano
>>>
>>> ---
>>> Daniel Kulp
>>> dkulp@apache.org
>>> http://www.dankulp.com/blog
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>>
>>
>>
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Antwort: Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by ja...@external.t-mobile.at.
Hello Daniel,

thanks for quick answer.
hopefully i'll find more time for debuging tomorow.
but now i want to try the trick with setting also endpoint and also to use 
generated service object. 

"actually, you aren't setting an endpointName/portName on the factory)"
do you mean factory.setEndpointName() with qname of port from wsdl? Or 
something more or different?

best regards
jano




Daniel Kulp <dk...@apache.org> 
05/14/2008 23:23
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus 
checked]







jano,

We might be getting someplace.   Thanks for doing some debugging.  I 
hope you're learning some stuff while doing it.  :-)

My main concern is the fact that you are even hitting lines 
131/107/202.   For a pure wsdl first case with valid values for the 
ServiceName/PortName that match the values in the wsdl, that code 
should never be reached.   (actually, you aren't setting an 
endpointName/portName on the factory)

Actually, that looks like it....   Looking at the code, if it cannot 
find an endpoint of the given name (you aren't giving it one, so it's 
creating a default one that might now mathc the wsdl), it creates a 
new endpoint with a new binding.


Can you get the stack trace at that point?    That might help figure 
out what is going on.


Actually, can you also try using the generated Service object to 
create the proxy instead of the JaxWsProxyFactoryBean?    If that 
works, then I at least know there is something "different" between the 
two and would be another place to start looking.

Dan





On May 14, 2008, at 4:42 PM, jan.minaroviech@external.t-mobile.at wrote:
> on return from
> public BindingInfo createBindingInfo(ServiceInfo service,
> javax.wsdl.Binding binding, String ns) {
> result contains operation with BindingOperationInfo with two 
> extensors -
> one SOAPOperationImpl with soapActionUri set to "default" and one
> SoapOperationInfo wiht action="default" (looks fine for me)
>
> then on the line 202: soapOperation.setSoapActionURI(soi.getAction());
> return empty string, which seems to be incorrect
>
>
> ok .. step back...
> on line 107: public BindingInfo createBindingInfo(ServiceInfo si, 
> String
> bindingid, Object conf) {
> variable "si" contains somewhere inside still correct soap action.
> created instance stored in "info" variable doesn't
> in fact also Operation info fetched on line 131: for (OperationInfo 
> op :
> si.getInterface().getOperations()) { doesn't contain required 
> informations
> .....
> in fact "si"  variable contains the same operation twice .. once 
> somewhere
> in bindings[0].operations and second in intf.operations .... for later
> there is not soap action (i mean no extensors .. maybe this is a 
> problem?)
>
> now i'm a bit lost in unknown code :( but hopefully i helped you a bit
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/13/2008 20:25
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus checked]
>
>
>
>
>
>
>
> I think I'm going to need a test case that shows this.   I just did
> some wireshark traces on a bunch of tests and they are all sending the
> SOAPAction properly.   There are a bunch of things that would break if
> this wasn't true such as the tck, ws-addressing interop, etc....
>
> For the wsdl first stuff, the soapAction should be pulled from the
> WSDL while processing the operations.   Specifically, line 540 of the
> SoapBindingFactory.java. That should be grabbing the stuff from the
> wsdl extensor and creating the appropriate thing we need.
>
>
> Dan
>
>
>
> On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at 
> wrote:
>
>> Hi,
>>
>>
>> wsdls says that soap action is "default" but on the wire it's sending
>> nothing.
>>
>> fragment of wsdl
>> <wsdl:binding name='getBrandServiceOperationsBinding'
>> type='tns:getBrandServiceOperations'>
>> <soap:binding style='document'
>> transport='http://schemas.xmlsoap.org/soap/http'/>
>> <wsdl:operation name='getBrandService'>
>>  <soap:operation soapAction='default'/>
>>  <wsdl:input>
>>   <soap:body use='literal'/>
>>  </wsdl:input>
>>  <wsdl:output>
>>   <soap:body use='literal'/>
>>  </wsdl:output>
>>  <wsdl:fault name='TechnicalExceptionFault'>
>>   <soap:fault name='TechnicalExceptionFault' use='literal'/>
>>  </wsdl:fault>
>> </wsdl:operation>
>> </wsdl:binding>
>>
>> i didn't find in sources a place, where action is set except the
>> place,
>> which is reading action from annotations.
>>
>> best regards
>> jano
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>> 05/13/2008 04:34
>> Bitte antworten an
>> users@cxf.apache.org
>>
>>
>> An
>> users@cxf.apache.org
>> Kopie
>>
>> Thema
>> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>
>>
>>
>>
>>
>>
>>
>> What does the wsdl say for the action field on the operations?
>>
>> If you create a service from the wsdl, the wsdl is the definitive
>> contract and is what we use to determine the soap action, not the
>> annotations.
>>
>> Dan
>>
>>
>> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at
>> wrote:
>>
>>> Hello,
>>>
>>> i'm using following code to obtain client proxy (some comments in
>>> code)
>>>
>>>
>>>              JaxWsProxyFactoryBean factory = new
>>> JaxWsProxyFactoryBean();
>>>              factory.setServiceClass(serviceInterface); // here is
>>> wsdl2java generated port interface (which contains
>>> soapaction="default")
>>>              factory.setAddress(address); // service provider
>>> endpoint
>>>              factory.setWsdlLocation(wsdlLocation); // in form
>>> classpath:xx.wsdl
>>>              factory.setServiceName(QName.valueOf(serviceName)); //
>>> from wsdl
>>>              factory.setProperties(new HashMap<String, Object>());
>>>              factory.getProperties().put("schema-validation-
>>> enabled",
>>> new Boolean(schemaValidationEnabled)); // true
>>>              T port = (T) factory.create();
>>>
>>> i'm using cxf 2.1
>>>
>>> during initialization it takes buildServiceFromWSDL path in
>>> ReflectionServiceFactoryBean
>>>
>>> during this path, it never invoked line like o.setProperty("action",
>>> getAction(o, method));
>>> which results in missing (empty) soap action .... which doesn't work
>>> for
>>> system i want to call.
>>>
>>> Am I doing something wrongly? Or did i miss something?
>>>
>>> I see it as a bug and fix seems to be to add missing magic line into
>>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are
>>> more
>>> places which are good enough for me, but i don't know which is the
>>> best in
>>> general.
>>>
>>> best regards
>>> jano
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>>
>>
>>
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog








Re: Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by Daniel Kulp <dk...@apache.org>.
jano,

We might be getting someplace.   Thanks for doing some debugging.  I  
hope you're learning some stuff while doing it.  :-)

My main concern is the fact that you are even hitting lines  
131/107/202.   For a pure wsdl first case with valid values for the  
ServiceName/PortName that match the values in the wsdl, that code  
should never be reached.   (actually, you aren't setting an  
endpointName/portName on the factory)

Actually, that looks like it....   Looking at the code, if it cannot  
find an endpoint of the given name (you aren't giving it one, so it's  
creating a default one that might now mathc the wsdl), it creates a  
new endpoint with a new binding.


Can you get the stack trace at that point?    That might help figure  
out what is going on.


Actually, can you also try using the generated Service object to  
create the proxy instead of the JaxWsProxyFactoryBean?    If that  
works, then I at least know there is something "different" between the  
two and would be another place to start looking.

Dan





On May 14, 2008, at 4:42 PM, jan.minaroviech@external.t-mobile.at wrote:
> on return from
> public BindingInfo createBindingInfo(ServiceInfo service,
> javax.wsdl.Binding binding, String ns) {
> result contains operation with BindingOperationInfo with two  
> extensors -
> one SOAPOperationImpl with soapActionUri set to "default" and one
> SoapOperationInfo wiht action="default" (looks fine for me)
>
> then on the line 202: soapOperation.setSoapActionURI(soi.getAction());
> return empty string, which seems to be incorrect
>
>
> ok .. step back...
> on line 107: public BindingInfo createBindingInfo(ServiceInfo si,  
> String
> bindingid, Object conf) {
> variable "si" contains somewhere inside still correct soap action.
> created instance stored in "info" variable doesn't
> in fact also Operation info fetched on line 131: for (OperationInfo  
> op :
> si.getInterface().getOperations()) { doesn't contain required  
> informations
> .....
> in fact "si"  variable contains the same operation twice .. once  
> somewhere
> in bindings[0].operations and second in intf.operations .... for later
> there is not soap action (i mean no extensors .. maybe this is a  
> problem?)
>
> now i'm a bit lost in unknown code :( but hopefully i helped you a bit
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/13/2008 20:25
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus checked]
>
>
>
>
>
>
>
> I think I'm going to need a test case that shows this.   I just did
> some wireshark traces on a bunch of tests and they are all sending the
> SOAPAction properly.   There are a bunch of things that would break if
> this wasn't true such as the tck, ws-addressing interop, etc....
>
> For the wsdl first stuff, the soapAction should be pulled from the
> WSDL while processing the operations.   Specifically, line 540 of the
> SoapBindingFactory.java. That should be grabbing the stuff from the
> wsdl extensor and creating the appropriate thing we need.
>
>
> Dan
>
>
>
> On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at  
> wrote:
>
>> Hi,
>>
>>
>> wsdls says that soap action is "default" but on the wire it's sending
>> nothing.
>>
>> fragment of wsdl
>> <wsdl:binding name='getBrandServiceOperationsBinding'
>> type='tns:getBrandServiceOperations'>
>> <soap:binding style='document'
>> transport='http://schemas.xmlsoap.org/soap/http'/>
>> <wsdl:operation name='getBrandService'>
>>  <soap:operation soapAction='default'/>
>>  <wsdl:input>
>>   <soap:body use='literal'/>
>>  </wsdl:input>
>>  <wsdl:output>
>>   <soap:body use='literal'/>
>>  </wsdl:output>
>>  <wsdl:fault name='TechnicalExceptionFault'>
>>   <soap:fault name='TechnicalExceptionFault' use='literal'/>
>>  </wsdl:fault>
>> </wsdl:operation>
>> </wsdl:binding>
>>
>> i didn't find in sources a place, where action is set except the
>> place,
>> which is reading action from annotations.
>>
>> best regards
>> jano
>>
>>
>>
>>
>> Daniel Kulp <dk...@apache.org>
>> 05/13/2008 04:34
>> Bitte antworten an
>> users@cxf.apache.org
>>
>>
>> An
>> users@cxf.apache.org
>> Kopie
>>
>> Thema
>> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>>
>>
>>
>>
>>
>>
>>
>> What does the wsdl say for the action field on the operations?
>>
>> If you create a service from the wsdl, the wsdl is the definitive
>> contract and is what we use to determine the soap action, not the
>> annotations.
>>
>> Dan
>>
>>
>> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at
>> wrote:
>>
>>> Hello,
>>>
>>> i'm using following code to obtain client proxy (some comments in
>>> code)
>>>
>>>
>>>              JaxWsProxyFactoryBean factory = new
>>> JaxWsProxyFactoryBean();
>>>              factory.setServiceClass(serviceInterface); // here is
>>> wsdl2java generated port interface (which contains
>>> soapaction="default")
>>>              factory.setAddress(address); // service provider
>>> endpoint
>>>              factory.setWsdlLocation(wsdlLocation); // in form
>>> classpath:xx.wsdl
>>>              factory.setServiceName(QName.valueOf(serviceName)); //
>>> from wsdl
>>>              factory.setProperties(new HashMap<String, Object>());
>>>              factory.getProperties().put("schema-validation-
>>> enabled",
>>> new Boolean(schemaValidationEnabled)); // true
>>>              T port = (T) factory.create();
>>>
>>> i'm using cxf 2.1
>>>
>>> during initialization it takes buildServiceFromWSDL path in
>>> ReflectionServiceFactoryBean
>>>
>>> during this path, it never invoked line like o.setProperty("action",
>>> getAction(o, method));
>>> which results in missing (empty) soap action .... which doesn't work
>>> for
>>> system i want to call.
>>>
>>> Am I doing something wrongly? Or did i miss something?
>>>
>>> I see it as a bug and fix seems to be to add missing magic line into
>>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are
>>> more
>>> places which are good enough for me, but i don't know which is the
>>> best in
>>> general.
>>>
>>> best regards
>>> jano
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>>
>>
>>
>>
>>
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by ja...@external.t-mobile.at.
Hi,

some more notes.

program flow goes through 
SoapBindingFactory:540 which sets correct soap action.

but later it goes also through

SoapBindingFactory:134 
sop.setAction(config.getSoapAction(op)); 
which set empty string.

maybe problem is that it shouldn't go through 2nd call, but instead use 
somehow .. in fact i'm lost again

best regards
jano




jan.minaroviech@external.t-mobile.at 
05/14/2008 22:42
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie
users@cxf.apache.org
Thema
Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus 
checked]






Hello,

during initialization:
SoapBindingFactory:540 returns correct soap action.

on return from
public BindingInfo createBindingInfo(ServiceInfo service, 
javax.wsdl.Binding binding, String ns) {
result contains operation with BindingOperationInfo with two extensors - 
one SOAPOperationImpl with soapActionUri set to "default" and one 
SoapOperationInfo wiht action="default" (looks fine for me)

then on the line 202: soapOperation.setSoapActionURI(soi.getAction()); 
return empty string, which seems to be incorrect


ok .. step back...
on line 107: public BindingInfo createBindingInfo(ServiceInfo si, String 
bindingid, Object conf) {
variable "si" contains somewhere inside still correct soap action.
created instance stored in "info" variable doesn't 
in fact also Operation info fetched on line 131: for (OperationInfo op : 
si.getInterface().getOperations()) { doesn't contain required informations 

.....
in fact "si"  variable contains the same operation twice .. once somewhere 

in bindings[0].operations and second in intf.operations .... for later 
there is not soap action (i mean no extensors .. maybe this is a problem?)

now i'm a bit lost in unknown code :( but hopefully i helped you a bit

best regards
jano




Daniel Kulp <dk...@apache.org> 
05/13/2008 20:25
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus checked]







I think I'm going to need a test case that shows this.   I just did 
some wireshark traces on a bunch of tests and they are all sending the 
SOAPAction properly.   There are a bunch of things that would break if 
this wasn't true such as the tck, ws-addressing interop, etc....

For the wsdl first stuff, the soapAction should be pulled from the 
WSDL while processing the operations.   Specifically, line 540 of the 
SoapBindingFactory.java. That should be grabbing the stuff from the 
wsdl extensor and creating the appropriate thing we need.


Dan



On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at wrote:

> Hi,
>
>
> wsdls says that soap action is "default" but on the wire it's sending
> nothing.
>
> fragment of wsdl
> <wsdl:binding name='getBrandServiceOperationsBinding'
> type='tns:getBrandServiceOperations'>
>  <soap:binding style='document'
> transport='http://schemas.xmlsoap.org/soap/http'/>
>  <wsdl:operation name='getBrandService'>
>   <soap:operation soapAction='default'/>
>   <wsdl:input>
>    <soap:body use='literal'/>
>   </wsdl:input>
>   <wsdl:output>
>    <soap:body use='literal'/>
>   </wsdl:output>
>   <wsdl:fault name='TechnicalExceptionFault'>
>    <soap:fault name='TechnicalExceptionFault' use='literal'/>
>   </wsdl:fault>
>  </wsdl:operation>
> </wsdl:binding>
>
> i didn't find in sources a place, where action is set except the 
> place,
> which is reading action from annotations.
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/13/2008 04:34
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>
>
>
>
>
>
>
> What does the wsdl say for the action field on the operations?
>
> If you create a service from the wsdl, the wsdl is the definitive
> contract and is what we use to determine the soap action, not the
> annotations.
>
> Dan
>
>
> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at 
> wrote:
>
>> Hello,
>>
>> i'm using following code to obtain client proxy (some comments in
>> code)
>>
>>
>>               JaxWsProxyFactoryBean factory = new
>> JaxWsProxyFactoryBean();
>>               factory.setServiceClass(serviceInterface); // here is
>> wsdl2java generated port interface (which contains
>> soapaction="default")
>>               factory.setAddress(address); // service provider
>> endpoint
>>               factory.setWsdlLocation(wsdlLocation); // in form
>> classpath:xx.wsdl
>>               factory.setServiceName(QName.valueOf(serviceName)); //
>> from wsdl
>>               factory.setProperties(new HashMap<String, Object>());
>>               factory.getProperties().put("schema-validation-
>> enabled",
>> new Boolean(schemaValidationEnabled)); // true
>>               T port = (T) factory.create();
>>
>> i'm using cxf 2.1
>>
>> during initialization it takes buildServiceFromWSDL path in
>> ReflectionServiceFactoryBean
>>
>> during this path, it never invoked line like o.setProperty("action",
>> getAction(o, method));
>> which results in missing (empty) soap action .... which doesn't work
>> for
>> system i want to call.
>>
>> Am I doing something wrongly? Or did i miss something?
>>
>> I see it as a bug and fix seems to be to add missing magic line into
>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are
>> more
>> places which are good enough for me, but i don't know which is the
>> best in
>> general.
>>
>> best regards
>> jano
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog









Antwort: Re: Antwort: Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by ja...@external.t-mobile.at.
Hello,

during initialization:
SoapBindingFactory:540 returns correct soap action.

on return from
public BindingInfo createBindingInfo(ServiceInfo service, 
javax.wsdl.Binding binding, String ns) {
result contains operation with BindingOperationInfo with two extensors - 
one SOAPOperationImpl with soapActionUri set to "default" and one 
SoapOperationInfo wiht action="default" (looks fine for me)

then on the line 202: soapOperation.setSoapActionURI(soi.getAction()); 
return empty string, which seems to be incorrect


ok .. step back...
on line 107: public BindingInfo createBindingInfo(ServiceInfo si, String 
bindingid, Object conf) {
variable "si" contains somewhere inside still correct soap action.
created instance stored in "info" variable doesn't 
in fact also Operation info fetched on line 131: for (OperationInfo op : 
si.getInterface().getOperations()) { doesn't contain required informations 
.....
in fact "si"  variable contains the same operation twice .. once somewhere 
in bindings[0].operations and second in intf.operations .... for later 
there is not soap action (i mean no extensors .. maybe this is a problem?)

now i'm a bit lost in unknown code :( but hopefully i helped you a bit

best regards
jano




Daniel Kulp <dk...@apache.org> 
05/13/2008 20:25
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: Antwort: Re: empty soap action using JAXWS/JAXB  [Virus checked]







I think I'm going to need a test case that shows this.   I just did 
some wireshark traces on a bunch of tests and they are all sending the 
SOAPAction properly.   There are a bunch of things that would break if 
this wasn't true such as the tck, ws-addressing interop, etc....

For the wsdl first stuff, the soapAction should be pulled from the 
WSDL while processing the operations.   Specifically, line 540 of the 
SoapBindingFactory.java. That should be grabbing the stuff from the 
wsdl extensor and creating the appropriate thing we need.


Dan



On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at wrote:

> Hi,
>
>
> wsdls says that soap action is "default" but on the wire it's sending
> nothing.
>
> fragment of wsdl
> <wsdl:binding name='getBrandServiceOperationsBinding'
> type='tns:getBrandServiceOperations'>
>  <soap:binding style='document'
> transport='http://schemas.xmlsoap.org/soap/http'/>
>  <wsdl:operation name='getBrandService'>
>   <soap:operation soapAction='default'/>
>   <wsdl:input>
>    <soap:body use='literal'/>
>   </wsdl:input>
>   <wsdl:output>
>    <soap:body use='literal'/>
>   </wsdl:output>
>   <wsdl:fault name='TechnicalExceptionFault'>
>    <soap:fault name='TechnicalExceptionFault' use='literal'/>
>   </wsdl:fault>
>  </wsdl:operation>
> </wsdl:binding>
>
> i didn't find in sources a place, where action is set except the 
> place,
> which is reading action from annotations.
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/13/2008 04:34
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>
>
>
>
>
>
>
> What does the wsdl say for the action field on the operations?
>
> If you create a service from the wsdl, the wsdl is the definitive
> contract and is what we use to determine the soap action, not the
> annotations.
>
> Dan
>
>
> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at 
> wrote:
>
>> Hello,
>>
>> i'm using following code to obtain client proxy (some comments in
>> code)
>>
>>
>>               JaxWsProxyFactoryBean factory = new
>> JaxWsProxyFactoryBean();
>>               factory.setServiceClass(serviceInterface); // here is
>> wsdl2java generated port interface (which contains
>> soapaction="default")
>>               factory.setAddress(address); // service provider
>> endpoint
>>               factory.setWsdlLocation(wsdlLocation); // in form
>> classpath:xx.wsdl
>>               factory.setServiceName(QName.valueOf(serviceName)); //
>> from wsdl
>>               factory.setProperties(new HashMap<String, Object>());
>>               factory.getProperties().put("schema-validation-
>> enabled",
>> new Boolean(schemaValidationEnabled)); // true
>>               T port = (T) factory.create();
>>
>> i'm using cxf 2.1
>>
>> during initialization it takes buildServiceFromWSDL path in
>> ReflectionServiceFactoryBean
>>
>> during this path, it never invoked line like o.setProperty("action",
>> getAction(o, method));
>> which results in missing (empty) soap action .... which doesn't work
>> for
>> system i want to call.
>>
>> Am I doing something wrongly? Or did i miss something?
>>
>> I see it as a bug and fix seems to be to add missing magic line into
>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are
>> more
>> places which are good enough for me, but i don't know which is the
>> best in
>> general.
>>
>> best regards
>> jano
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog








Re: Antwort: Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by Daniel Kulp <dk...@apache.org>.
I think I'm going to need a test case that shows this.   I just did  
some wireshark traces on a bunch of tests and they are all sending the  
SOAPAction properly.   There are a bunch of things that would break if  
this wasn't true such as the tck, ws-addressing interop, etc....

For the wsdl first stuff, the soapAction should be pulled from the  
WSDL while processing the operations.   Specifically, line 540 of the  
SoapBindingFactory.java. That should be grabbing the stuff from the  
wsdl extensor and creating the appropriate thing we need.


Dan



On May 13, 2008, at 4:52 AM, jan.minaroviech@external.t-mobile.at wrote:

> Hi,
>
>
> wsdls says that soap action is "default" but on the wire it's sending
> nothing.
>
> fragment of wsdl
> <wsdl:binding name='getBrandServiceOperationsBinding'
> type='tns:getBrandServiceOperations'>
>  <soap:binding style='document'
> transport='http://schemas.xmlsoap.org/soap/http'/>
>  <wsdl:operation name='getBrandService'>
>   <soap:operation soapAction='default'/>
>   <wsdl:input>
>    <soap:body use='literal'/>
>   </wsdl:input>
>   <wsdl:output>
>    <soap:body use='literal'/>
>   </wsdl:output>
>   <wsdl:fault name='TechnicalExceptionFault'>
>    <soap:fault name='TechnicalExceptionFault' use='literal'/>
>   </wsdl:fault>
>  </wsdl:operation>
> </wsdl:binding>
>
> i didn't find in sources a place, where action is set except the  
> place,
> which is reading action from annotations.
>
> best regards
> jano
>
>
>
>
> Daniel Kulp <dk...@apache.org>
> 05/13/2008 04:34
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: empty soap action using JAXWS/JAXB  [Virus checked]
>
>
>
>
>
>
>
> What does the wsdl say for the action field on the operations?
>
> If you create a service from the wsdl, the wsdl is the definitive
> contract and is what we use to determine the soap action, not the
> annotations.
>
> Dan
>
>
> On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at  
> wrote:
>
>> Hello,
>>
>> i'm using following code to obtain client proxy (some comments in
>> code)
>>
>>
>>               JaxWsProxyFactoryBean factory = new
>> JaxWsProxyFactoryBean();
>>               factory.setServiceClass(serviceInterface); // here is
>> wsdl2java generated port interface (which contains
>> soapaction="default")
>>               factory.setAddress(address); // service provider
>> endpoint
>>               factory.setWsdlLocation(wsdlLocation); // in form
>> classpath:xx.wsdl
>>               factory.setServiceName(QName.valueOf(serviceName)); //
>> from wsdl
>>               factory.setProperties(new HashMap<String, Object>());
>>               factory.getProperties().put("schema-validation-
>> enabled",
>> new Boolean(schemaValidationEnabled)); // true
>>               T port = (T) factory.create();
>>
>> i'm using cxf 2.1
>>
>> during initialization it takes buildServiceFromWSDL path in
>> ReflectionServiceFactoryBean
>>
>> during this path, it never invoked line like o.setProperty("action",
>> getAction(o, method));
>> which results in missing (empty) soap action .... which doesn't work
>> for
>> system i want to call.
>>
>> Am I doing something wrongly? Or did i miss something?
>>
>> I see it as a bug and fix seems to be to add missing magic line into
>> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are
>> more
>> places which are good enough for me, but i don't know which is the
>> best in
>> general.
>>
>> best regards
>> jano
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Antwort: Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by ja...@external.t-mobile.at.
Hi,

wsdls says that soap action is "default" but on the wire it's sending 
nothing. 

fragment of wsdl
 <wsdl:binding name='getBrandServiceOperationsBinding' 
type='tns:getBrandServiceOperations'>
  <soap:binding style='document' 
transport='http://schemas.xmlsoap.org/soap/http'/>
  <wsdl:operation name='getBrandService'>
   <soap:operation soapAction='default'/>
   <wsdl:input>
    <soap:body use='literal'/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use='literal'/>
   </wsdl:output>
   <wsdl:fault name='TechnicalExceptionFault'>
    <soap:fault name='TechnicalExceptionFault' use='literal'/>
   </wsdl:fault>
  </wsdl:operation>
 </wsdl:binding>

i didn't find in sources a place, where action is set except the place, 
which is reading action from annotations.

best regards
jano




Daniel Kulp <dk...@apache.org> 
05/13/2008 04:34
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: empty soap action using JAXWS/JAXB  [Virus checked]







What does the wsdl say for the action field on the operations?

If you create a service from the wsdl, the wsdl is the definitive 
contract and is what we use to determine the soap action, not the 
annotations.

Dan


On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at wrote:

> Hello,
>
> i'm using following code to obtain client proxy (some comments in 
> code)
>
>
>                JaxWsProxyFactoryBean factory = new
> JaxWsProxyFactoryBean();
>                factory.setServiceClass(serviceInterface); // here is
> wsdl2java generated port interface (which contains 
> soapaction="default")
>                factory.setAddress(address); // service provider 
> endpoint
>                factory.setWsdlLocation(wsdlLocation); // in form
> classpath:xx.wsdl
>                factory.setServiceName(QName.valueOf(serviceName)); //
> from wsdl
>                factory.setProperties(new HashMap<String, Object>());
>                factory.getProperties().put("schema-validation- 
> enabled",
> new Boolean(schemaValidationEnabled)); // true
>                T port = (T) factory.create();
>
> i'm using cxf 2.1
>
> during initialization it takes buildServiceFromWSDL path in
> ReflectionServiceFactoryBean
>
> during this path, it never invoked line like o.setProperty("action",
> getAction(o, method));
> which results in missing (empty) soap action .... which doesn't work 
> for
> system i want to call.
>
> Am I doing something wrongly? Or did i miss something?
>
> I see it as a bug and fix seems to be to add missing magic line into
> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are 
> more
> places which are good enough for me, but i don't know which is the 
> best in
> general.
>
> best regards
> jano

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog








Re: empty soap action using JAXWS/JAXB [Virus checked]

Posted by Daniel Kulp <dk...@apache.org>.
What does the wsdl say for the action field on the operations?

If you create a service from the wsdl, the wsdl is the definitive  
contract and is what we use to determine the soap action, not the  
annotations.

Dan


On May 7, 2008, at 4:54 AM, jan.minaroviech@external.t-mobile.at wrote:

> Hello,
>
> i'm using following code to obtain client proxy (some comments in  
> code)
>
>
>                JaxWsProxyFactoryBean factory = new
> JaxWsProxyFactoryBean();
>                factory.setServiceClass(serviceInterface); // here is
> wsdl2java generated port interface (which contains  
> soapaction="default")
>                factory.setAddress(address); // service provider  
> endpoint
>                factory.setWsdlLocation(wsdlLocation); // in form
> classpath:xx.wsdl
>                factory.setServiceName(QName.valueOf(serviceName)); //
> from wsdl
>                factory.setProperties(new HashMap<String, Object>());
>                factory.getProperties().put("schema-validation- 
> enabled",
> new Boolean(schemaValidationEnabled)); // true
>                T port = (T) factory.create();
>
> i'm using cxf 2.1
>
> during initialization it takes buildServiceFromWSDL path in
> ReflectionServiceFactoryBean
>
> during this path, it never invoked line like o.setProperty("action",
> getAction(o, method));
> which results in missing (empty) soap action .... which doesn't work  
> for
> system i want to call.
>
> Am I doing something wrongly? Or did i miss something?
>
> I see it as a bug and fix seems to be to add missing magic line into
> initializeWSDLOperation of JaxWsServiceFactoryBean class. There are  
> more
> places which are good enough for me, but i don't know which is the  
> best in
> general.
>
> best regards
> jano

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog





Antwort: empty soap action using JAXWS/JAXB [Virus checked]

Posted by ja...@external.t-mobile.at.
Hello,

noone knows answer? (bug or incorrect usage?)

best regards
jano



jan.minaroviech@external.t-mobile.at 
05/07/2008 11:25
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Antwort: empty soap action using JAXWS/JAXB  [Virus checked]






Hello, 

following fix works for me:
apache-cxf-2.1-src\rt\frontend\jaxws\src\main\java\org\apache\cxf\jaxws\support\JaxWsServiceFactoryBean.java 


add
o.setProperty("action", getAction(o, method));
after
o.setProperty(METHOD, method);
in 
initializeWSDLOperation(InterfaceInfo intf, OperationInfo o, Method 
method)

but i still don't know, if i'm doing something wrongly, or if it is a bug 
and i should create new issue for it.

best regards
jano




jan.minaroviech@external.t-mobile.at 
05/07/2008 10:54
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
empty soap action using JAXWS/JAXB  [Virus checked]






Hello,

i'm using following code to obtain client proxy (some comments in code)


                JaxWsProxyFactoryBean factory = new 
JaxWsProxyFactoryBean();
                factory.setServiceClass(serviceInterface); // here is 
wsdl2java generated port interface (which contains soapaction="default")
                factory.setAddress(address); // service provider endpoint
                factory.setWsdlLocation(wsdlLocation); // in form 
classpath:xx.wsdl
                factory.setServiceName(QName.valueOf(serviceName)); // 
from wsdl
                factory.setProperties(new HashMap<String, Object>());
                factory.getProperties().put("schema-validation-enabled", 
new Boolean(schemaValidationEnabled)); // true
                T port = (T) factory.create();

i'm using cxf 2.1

during initialization it takes buildServiceFromWSDL path in 
ReflectionServiceFactoryBean

during this path, it never invoked line like o.setProperty("action", 
getAction(o, method));
which results in missing (empty) soap action .... which doesn't work for 
system i want to call.

Am I doing something wrongly? Or did i miss something?

I see it as a bug and fix seems to be to add missing magic line into 
initializeWSDLOperation of JaxWsServiceFactoryBean class. There are more 
places which are good enough for me, but i don't know which is the best in 


general.

best regards
jano


Antwort: empty soap action using JAXWS/JAXB [Virus checked]

Posted by ja...@external.t-mobile.at.
Hello, 

following fix works for me:
apache-cxf-2.1-src\rt\frontend\jaxws\src\main\java\org\apache\cxf\jaxws\support\JaxWsServiceFactoryBean.java 

add
o.setProperty("action", getAction(o, method));
after
o.setProperty(METHOD, method);
in 
initializeWSDLOperation(InterfaceInfo intf, OperationInfo o, Method 
method)

but i still don't know, if i'm doing something wrongly, or if it is a bug 
and i should create new issue for it.

best regards
jano




jan.minaroviech@external.t-mobile.at 
05/07/2008 10:54
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
empty soap action using JAXWS/JAXB  [Virus checked]






Hello,

i'm using following code to obtain client proxy (some comments in code)


                JaxWsProxyFactoryBean factory = new 
JaxWsProxyFactoryBean();
                factory.setServiceClass(serviceInterface); // here is 
wsdl2java generated port interface (which contains soapaction="default")
                factory.setAddress(address); // service provider endpoint
                factory.setWsdlLocation(wsdlLocation); // in form 
classpath:xx.wsdl
                factory.setServiceName(QName.valueOf(serviceName)); // 
from wsdl
                factory.setProperties(new HashMap<String, Object>());
                factory.getProperties().put("schema-validation-enabled", 
new Boolean(schemaValidationEnabled)); // true
                T port = (T) factory.create();

i'm using cxf 2.1

during initialization it takes buildServiceFromWSDL path in 
ReflectionServiceFactoryBean

during this path, it never invoked line like o.setProperty("action", 
getAction(o, method));
which results in missing (empty) soap action .... which doesn't work for 
system i want to call.

Am I doing something wrongly? Or did i miss something?

I see it as a bug and fix seems to be to add missing magic line into 
initializeWSDLOperation of JaxWsServiceFactoryBean class. There are more 
places which are good enough for me, but i don't know which is the best in 

general.

best regards
jano