[ 
https://issues.apache.org/jira/browse/GERONIMO-3462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526566
 ] 

Jarek Gawor commented on GERONIMO-3462:
---------------------------------------

Tomek,

I'm still unable to reproduce your result. I created a test case in Geronimo 
for this issue. Can you maybe test your php client against the test service in 
Geronimo? 

To get/build the test service:

1) check out Geronimo from trunk and build it
2) start Geronimo (either your version or the one you just built)
3) cd testsuite/webservices-testsuite/jaxws-tests/jaxws-ejb and run "mvn -P 
child". 

The last step will build the test service, deploy it, run some tests (they all 
should pass), and undeploy it. Once that is done, you can deploy by hand the 
generated .jar file in the target directory. Then update your php script to 
talk to this service and see how the fault looks like.


> Problem with throwing SOAPFaultException within WebService based on 
> SessionBean 
> --------------------------------------------------------------------------------
>
>                 Key: GERONIMO-3462
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3462
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0.1
>         Environment: ApacheCXF as service provider
>            Reporter: Tomasz Mazan
>            Assignee: Jarek Gawor
>
> I create SOAPFaultException using code below:
> {noformat}
>       public SOAPFaultException createFault(String errorCode, String 
> errorString) {
>               SOAPFault fault = null;
>               try {
>                       fault = SOAPFactory.newInstance().createFault();
>                       fault.setFaultCode(new QName("foo", "bar", "abc"));
>                       fault.setFaultString(errorString);
>                       fault.setFaultActor("ACTOR");
>               } catch (SOAPException ex) {
>                       return new SOAPFaultException(null);
>               }
>               return new SOAPFaultException(fault);
>       }
> {noformat}
> and my WebMethod returns this exception in case internal exception:
> {noformat}
> @WebService(serviceName = "MyService", portName = "CustomerServices")
> @Stateless(name = "MyCustomerService")
> public class MyCustomerService {
>       
>       @EJB
>       private CoreManager coreManager = null;
>       public MyCustomerService() {
>       }
>       @WebMethod(operationName = "createCustomer")
>       public Customer createCustomer(@WebParam(name = "identifier") String 
> identifier) throws SOAPFaultException {
>               try {
>                       return this.coreManager.createCustomer(identifier);
>               } catch (ServiceException e) {
>                       throw this.faultService.createFault("FAULT CODE", 
> "FAULT STRING");
>               }
>               
>       }
> }
> {noformat}
> and client catches fault with attributes:
> {noformat}
>   ["faultstring"]=> string(298) "java.rmi.RemoteException: The bean 
> encountered a non-application exception.; nested exception is: 
> javax.xml.ws.soap.SOAPFaultException: FAULT STRING: The bean encountered a 
> non-application exception.; nested exception i
> s: javax.xml.ws.soap.SOAPFaultException: FAULT STRING"
>   ["faultcode"]=> string(11) "soap:Server"
> {noformat}

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

Reply via email to