You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jara Cesnek (JIRA)" <ji...@apache.org> on 2010/02/09 10:35:28 UTC

[jira] Created: (CXF-2665) "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.

"Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
-----------------------------------------------------------------------------------------------

                 Key: CXF-2665
                 URL: https://issues.apache.org/jira/browse/CXF-2665
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.2.6
            Reporter: Jara Cesnek
            Priority: Critical


Problem is that "remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
Methods from client (remote) interface return null values.

Reason: server leaks namespace from service implementation (not only interface) .. so client can read data and return null

Server code:
{code}
        JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
        serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class
        serverFactoryBean.setServiceBean(implementor);                                                  //WSImpl.class
        serverFactoryBean.setDataBinding(new AegisDatabinding());
        serverFactoryBean.setAddress(url);
        serverFactoryBean.setBus(cxfServlet.getBus());
        serverFactoryBean.create();
{code}

Client code:
{code}
            JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
            factory.setServiceClass(resultInterfaceClass);                                 //WS.class
            factory.setAddress(asURL);
            factory.setDataBinding(new AegisDatabinding());
            Object remoteInterfaceImpl = factory.create();
{code}

Interface:
{code}
@WebService(name="datove_zdroje", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz")
public interface WS {
           List<String> getCodes(@WebParam(name = "baseCode") String baseCode);
}
{code}

Implementation:
{code}
@WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS")
public class WSImpl implements WS {

    @Override
    public List<String> getCodes(final String baseCode) {
        return new ArrayList<String>();
    }
}
{code}

*In this configuration client always receive "NULL" from method call !*

Problem is that server include in WSDL(and XML communication) namespace from service implementation (WSImpl.java) - not only from (client) interface (WS.java).
In this particular case servers "targetNamespace" is empty. So server made it up from class and package name. But client has only information from interface.

Client anticipate that "ServiceNamespace" is equals with "targetNamespace" from interface (WS.java) WebService annotation.  

*Working WSImpl.java:*
{code}
@WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
*targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz"* //must be same as WS.java targetNamespace
)
public class WSImpl implements WS {
{code}

*NON-Working WSImpl.java:*
{code}
@WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
*targetNamespace=""* //empty or other than WS.java targetNamespace
)
public class WSImpl implements WS {
{code}


We need clarify real meaning of @WebService(targetNamespace="") on service implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2665) "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.

Posted by "Jara Cesnek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831519#action_12831519 ] 

Jara Cesnek commented on CXF-2665:
----------------------------------

Removing serverFactoryBean.setServiceClass(...) not helping. 

(Are you sure that interface should be set to this method? 
I think there should be implementation class. 

serverFactoryBean.setServiceClass(WS *Impl*.class);
)


Anyway in WSDL is still *java package* of implementation! So client cant be aware of this namespace. Client has of course only interface.

<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" 
targetNamespace=" *http ://v1_1_2.rtf2pdf.pdf.doc.modules.daisy.marbes.cz/"*               //this namespace is NOT in interface annotation
xmlns:tns=" *http ://v1_1_2.rtf2pdf.pdf.doc.modules.daisy.marbes.cz/"*                              //this namespace is NOT in interface annotation
 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="ArrayOfString">
<xsd:sequence>
  <xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:schema>


Strangest thing is that single method with List<String> broke all methods in interface. When I remove single method with List<String> other methods start working.




> "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-2665
>                 URL: https://issues.apache.org/jira/browse/CXF-2665
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.6
>            Reporter: Jara Cesnek
>            Priority: Critical
>
> Problem is that "remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> Methods from client (remote) interface return null values.
> Reason: server leaks namespace from service implementation (not only interface) .. so client can read data and return null
> Server code:
> {code}
>         JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class
>         serverFactoryBean.setServiceBean(implementor);                                                  //WSImpl.class
>         serverFactoryBean.setDataBinding(new AegisDatabinding());
>         serverFactoryBean.setAddress(url);
>         serverFactoryBean.setBus(cxfServlet.getBus());
>         serverFactoryBean.create();
> {code}
> Client code:
> {code}
>             JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>             factory.setServiceClass(resultInterfaceClass);                                 //WS.class
>             factory.setAddress(asURL);
>             factory.setDataBinding(new AegisDatabinding());
>             Object remoteInterfaceImpl = factory.create();
> {code}
> Interface:
> {code}
> @WebService(name="datove_zdroje", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz")
> public interface WS {
>            List<String> getCodes(@WebParam(name = "baseCode") String baseCode);
> }
> {code}
> Implementation:
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS")
> public class WSImpl implements WS {
>     @Override
>     public List<String> getCodes(final String baseCode) {
>         return new ArrayList<String>();
>     }
> }
> {code}
> *In this configuration client always receive "NULL" from method call !*
> Problem is that server include in WSDL(and XML communication) namespace from service implementation (WSImpl.java) - not only from (client) interface (WS.java).
> In this particular case servers "targetNamespace" is empty. So server made it up from class and package name. But client has only information from interface.
> Client anticipate that "ServiceNamespace" is equals with "targetNamespace" from interface (WS.java) WebService annotation.  
> *Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz"* //must be same as WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> *NON-Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace=""* //empty or other than WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> We need clarify real meaning of @WebService(targetNamespace="") on service implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CXF-2665) "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.

Posted by "Jara Cesnek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831496#action_12831496 ] 

Jara Cesnek edited comment on CXF-2665 at 2/10/10 3:35 PM:
-----------------------------------------------------------

Additional info : This happens only when result type from any method is List<simple-type> like "List<String>".

      was (Author: cesnek):
    Additional info : This happens only when result or parameter type from any method is List<simple-type> like "List<String>".
  
> "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-2665
>                 URL: https://issues.apache.org/jira/browse/CXF-2665
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.6
>            Reporter: Jara Cesnek
>            Priority: Critical
>
> Problem is that "remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> Methods from client (remote) interface return null values.
> Reason: server leaks namespace from service implementation (not only interface) .. so client can read data and return null
> Server code:
> {code}
>         JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class
>         serverFactoryBean.setServiceBean(implementor);                                                  //WSImpl.class
>         serverFactoryBean.setDataBinding(new AegisDatabinding());
>         serverFactoryBean.setAddress(url);
>         serverFactoryBean.setBus(cxfServlet.getBus());
>         serverFactoryBean.create();
> {code}
> Client code:
> {code}
>             JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>             factory.setServiceClass(resultInterfaceClass);                                 //WS.class
>             factory.setAddress(asURL);
>             factory.setDataBinding(new AegisDatabinding());
>             Object remoteInterfaceImpl = factory.create();
> {code}
> Interface:
> {code}
> @WebService(name="datove_zdroje", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz")
> public interface WS {
>            List<String> getCodes(@WebParam(name = "baseCode") String baseCode);
> }
> {code}
> Implementation:
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS")
> public class WSImpl implements WS {
>     @Override
>     public List<String> getCodes(final String baseCode) {
>         return new ArrayList<String>();
>     }
> }
> {code}
> *In this configuration client always receive "NULL" from method call !*
> Problem is that server include in WSDL(and XML communication) namespace from service implementation (WSImpl.java) - not only from (client) interface (WS.java).
> In this particular case servers "targetNamespace" is empty. So server made it up from class and package name. But client has only information from interface.
> Client anticipate that "ServiceNamespace" is equals with "targetNamespace" from interface (WS.java) WebService annotation.  
> *Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz"* //must be same as WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> *NON-Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace=""* //empty or other than WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> We need clarify real meaning of @WebService(targetNamespace="") on service implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2665) "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.

Posted by "Jara Cesnek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831496#action_12831496 ] 

Jara Cesnek commented on CXF-2665:
----------------------------------

Additional info : This happens only when result type from any method is List<simple-type> like "List<String>".

> "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-2665
>                 URL: https://issues.apache.org/jira/browse/CXF-2665
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.6
>            Reporter: Jara Cesnek
>            Priority: Critical
>
> Problem is that "remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> Methods from client (remote) interface return null values.
> Reason: server leaks namespace from service implementation (not only interface) .. so client can read data and return null
> Server code:
> {code}
>         JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class
>         serverFactoryBean.setServiceBean(implementor);                                                  //WSImpl.class
>         serverFactoryBean.setDataBinding(new AegisDatabinding());
>         serverFactoryBean.setAddress(url);
>         serverFactoryBean.setBus(cxfServlet.getBus());
>         serverFactoryBean.create();
> {code}
> Client code:
> {code}
>             JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>             factory.setServiceClass(resultInterfaceClass);                                 //WS.class
>             factory.setAddress(asURL);
>             factory.setDataBinding(new AegisDatabinding());
>             Object remoteInterfaceImpl = factory.create();
> {code}
> Interface:
> {code}
> @WebService(name="datove_zdroje", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz")
> public interface WS {
>            List<String> getCodes(@WebParam(name = "baseCode") String baseCode);
> }
> {code}
> Implementation:
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS")
> public class WSImpl implements WS {
>     @Override
>     public List<String> getCodes(final String baseCode) {
>         return new ArrayList<String>();
>     }
> }
> {code}
> *In this configuration client always receive "NULL" from method call !*
> Problem is that server include in WSDL(and XML communication) namespace from service implementation (WSImpl.java) - not only from (client) interface (WS.java).
> In this particular case servers "targetNamespace" is empty. So server made it up from class and package name. But client has only information from interface.
> Client anticipate that "ServiceNamespace" is equals with "targetNamespace" from interface (WS.java) WebService annotation.  
> *Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz"* //must be same as WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> *NON-Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace=""* //empty or other than WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> We need clarify real meaning of @WebService(targetNamespace="") on service implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-2665) "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2665.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.7
         Assignee: Daniel Kulp

> "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-2665
>                 URL: https://issues.apache.org/jira/browse/CXF-2665
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.6
>            Reporter: Jara Cesnek
>            Assignee: Daniel Kulp
>            Priority: Critical
>             Fix For: 2.2.7
>
>
> Problem is that "remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> Methods from client (remote) interface return null values.
> Reason: server leaks namespace from service implementation (not only interface) .. so client can read data and return null
> Server code:
> {code}
>         JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class
>         serverFactoryBean.setServiceBean(implementor);                                                  //WSImpl.class
>         serverFactoryBean.setDataBinding(new AegisDatabinding());
>         serverFactoryBean.setAddress(url);
>         serverFactoryBean.setBus(cxfServlet.getBus());
>         serverFactoryBean.create();
> {code}
> Client code:
> {code}
>             JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>             factory.setServiceClass(resultInterfaceClass);                                 //WS.class
>             factory.setAddress(asURL);
>             factory.setDataBinding(new AegisDatabinding());
>             Object remoteInterfaceImpl = factory.create();
> {code}
> Interface:
> {code}
> @WebService(name="datove_zdroje", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz")
> public interface WS {
>            List<String> getCodes(@WebParam(name = "baseCode") String baseCode);
> }
> {code}
> Implementation:
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS")
> public class WSImpl implements WS {
>     @Override
>     public List<String> getCodes(final String baseCode) {
>         return new ArrayList<String>();
>     }
> }
> {code}
> *In this configuration client always receive "NULL" from method call !*
> Problem is that server include in WSDL(and XML communication) namespace from service implementation (WSImpl.java) - not only from (client) interface (WS.java).
> In this particular case servers "targetNamespace" is empty. So server made it up from class and package name. But client has only information from interface.
> Client anticipate that "ServiceNamespace" is equals with "targetNamespace" from interface (WS.java) WebService annotation.  
> *Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz"* //must be same as WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> *NON-Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace=""* //empty or other than WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> We need clarify real meaning of @WebService(targetNamespace="") on service implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (CXF-2665) "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.

Posted by "Jara Cesnek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jara Cesnek closed CXF-2665.
----------------------------


Verified. Working fine.

Still wondering why implementation namespace is present in WSDL.
Is endpoint namespace is mainly meaningless information? 

> "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-2665
>                 URL: https://issues.apache.org/jira/browse/CXF-2665
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.6
>            Reporter: Jara Cesnek
>            Assignee: Daniel Kulp
>            Priority: Critical
>             Fix For: 2.2.7
>
>
> Problem is that "remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> Methods from client (remote) interface return null values.
> Reason: server leaks namespace from service implementation (not only interface) .. so client can read data and return null
> Server code:
> {code}
>         JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class
>         serverFactoryBean.setServiceBean(implementor);                                                  //WSImpl.class
>         serverFactoryBean.setDataBinding(new AegisDatabinding());
>         serverFactoryBean.setAddress(url);
>         serverFactoryBean.setBus(cxfServlet.getBus());
>         serverFactoryBean.create();
> {code}
> Client code:
> {code}
>             JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>             factory.setServiceClass(resultInterfaceClass);                                 //WS.class
>             factory.setAddress(asURL);
>             factory.setDataBinding(new AegisDatabinding());
>             Object remoteInterfaceImpl = factory.create();
> {code}
> Interface:
> {code}
> @WebService(name="datove_zdroje", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz")
> public interface WS {
>            List<String> getCodes(@WebParam(name = "baseCode") String baseCode);
> }
> {code}
> Implementation:
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS")
> public class WSImpl implements WS {
>     @Override
>     public List<String> getCodes(final String baseCode) {
>         return new ArrayList<String>();
>     }
> }
> {code}
> *In this configuration client always receive "NULL" from method call !*
> Problem is that server include in WSDL(and XML communication) namespace from service implementation (WSImpl.java) - not only from (client) interface (WS.java).
> In this particular case servers "targetNamespace" is empty. So server made it up from class and package name. But client has only information from interface.
> Client anticipate that "ServiceNamespace" is equals with "targetNamespace" from interface (WS.java) WebService annotation.  
> *Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz"* //must be same as WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> *NON-Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace=""* //empty or other than WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> We need clarify real meaning of @WebService(targetNamespace="") on service implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CXF-2665) "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.

Posted by "Jara Cesnek (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831496#action_12831496 ] 

Jara Cesnek edited comment on CXF-2665 at 2/9/10 3:55 PM:
----------------------------------------------------------

Additional info : This happens only when result or parameter type from any method is List<simple-type> like "List<String>".

      was (Author: cesnek):
    Additional info : This happens only when result type from any method is List<simple-type> like "List<String>".
  
> "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-2665
>                 URL: https://issues.apache.org/jira/browse/CXF-2665
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.6
>            Reporter: Jara Cesnek
>            Priority: Critical
>
> Problem is that "remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> Methods from client (remote) interface return null values.
> Reason: server leaks namespace from service implementation (not only interface) .. so client can read data and return null
> Server code:
> {code}
>         JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class
>         serverFactoryBean.setServiceBean(implementor);                                                  //WSImpl.class
>         serverFactoryBean.setDataBinding(new AegisDatabinding());
>         serverFactoryBean.setAddress(url);
>         serverFactoryBean.setBus(cxfServlet.getBus());
>         serverFactoryBean.create();
> {code}
> Client code:
> {code}
>             JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>             factory.setServiceClass(resultInterfaceClass);                                 //WS.class
>             factory.setAddress(asURL);
>             factory.setDataBinding(new AegisDatabinding());
>             Object remoteInterfaceImpl = factory.create();
> {code}
> Interface:
> {code}
> @WebService(name="datove_zdroje", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz")
> public interface WS {
>            List<String> getCodes(@WebParam(name = "baseCode") String baseCode);
> }
> {code}
> Implementation:
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS")
> public class WSImpl implements WS {
>     @Override
>     public List<String> getCodes(final String baseCode) {
>         return new ArrayList<String>();
>     }
> }
> {code}
> *In this configuration client always receive "NULL" from method call !*
> Problem is that server include in WSDL(and XML communication) namespace from service implementation (WSImpl.java) - not only from (client) interface (WS.java).
> In this particular case servers "targetNamespace" is empty. So server made it up from class and package name. But client has only information from interface.
> Client anticipate that "ServiceNamespace" is equals with "targetNamespace" from interface (WS.java) WebService annotation.  
> *Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz"* //must be same as WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> *NON-Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace=""* //empty or other than WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> We need clarify real meaning of @WebService(targetNamespace="") on service implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2665) "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831498#action_12831498 ] 

Daniel Kulp commented on CXF-2665:
----------------------------------



Two questions:

1) Can you package this into a small testcase and attach?

2) Can you try removing the line:
{code}
serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor));
{code}
or changing it to:
{code}
serverFactoryBean.setServiceClass(WS.class);
{code}



> "Remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> -----------------------------------------------------------------------------------------------
>
>                 Key: CXF-2665
>                 URL: https://issues.apache.org/jira/browse/CXF-2665
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.6
>            Reporter: Jara Cesnek
>            Priority: Critical
>
> Problem is that "remote procedure call" by couple JaxWsProxyFactoryBean and JaxWsServerFactoryBean doesnt work.
> Methods from client (remote) interface return null values.
> Reason: server leaks namespace from service implementation (not only interface) .. so client can read data and return null
> Server code:
> {code}
>         JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); //WSImpl.class
>         serverFactoryBean.setServiceBean(implementor);                                                  //WSImpl.class
>         serverFactoryBean.setDataBinding(new AegisDatabinding());
>         serverFactoryBean.setAddress(url);
>         serverFactoryBean.setBus(cxfServlet.getBus());
>         serverFactoryBean.create();
> {code}
> Client code:
> {code}
>             JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>             factory.setServiceClass(resultInterfaceClass);                                 //WS.class
>             factory.setAddress(asURL);
>             factory.setDataBinding(new AegisDatabinding());
>             Object remoteInterfaceImpl = factory.create();
> {code}
> Interface:
> {code}
> @WebService(name="datove_zdroje", targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz")
> public interface WS {
>            List<String> getCodes(@WebParam(name = "baseCode") String baseCode);
> }
> {code}
> Implementation:
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS")
> public class WSImpl implements WS {
>     @Override
>     public List<String> getCodes(final String baseCode) {
>         return new ArrayList<String>();
>     }
> }
> {code}
> *In this configuration client always receive "NULL" from method call !*
> Problem is that server include in WSDL(and XML communication) namespace from service implementation (WSImpl.java) - not only from (client) interface (WS.java).
> In this particular case servers "targetNamespace" is empty. So server made it up from class and package name. But client has only information from interface.
> Client anticipate that "ServiceNamespace" is equals with "targetNamespace" from interface (WS.java) WebService annotation.  
> *Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace="http://v1_0_0.ws.doc.daisy.marbes.cz"* //must be same as WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> *NON-Working WSImpl.java:*
> {code}
> @WebService(serviceName = "datove_zdroje", endpointInterface = "cz.marbes.daisy.modules.doc.ws.v1_0_0.WS", 
> *targetNamespace=""* //empty or other than WS.java targetNamespace
> )
> public class WSImpl implements WS {
> {code}
> We need clarify real meaning of @WebService(targetNamespace="") on service implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.