The version of EJB3 that comes with JBoss AS 4.0.4RC1 doesn't support the web 
service ref yet

see: http://jboss.com/index.html?module=bb&op=viewtopic&t=79178

The workaround I used when moving my application from EJB2.1 to EJB3 was to not 
follow the way you're supposed to consume web services within a EJB. I instead 
create the actual soap xml myself and code directly against SAAJ. 

private SOAPMessage callWS(String soapXml, URL endpoint, String soapAction) 
throws SOAPException, IOException{
  |    MessageFactory msgFactory = MessageFactory.newInstance();
  |    MimeHeaders mimeHeaders = new MimeHeaders();
  |    mimeHeaders.addHeader("Content-Type", "text/xml; charset=UTF-8");        
  |    if(soapAction != null && soapAction.length() > 0){
  |       mimeHeaders.addHeader("SOAPAction",soapAction);
  |    }        
  |    ByteArrayInputStream in = new ByteArrayInputStream(soapXml.getBytes());
  |    SOAPMessage reqMsg = msgFactory.createMessage(mimeHeaders, in);
  | 
  |    SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance();
  |    SOAPConnection conn = conFactory.createConnection();
  |             
  |    return conn.call(reqMsg, endpoint);
  | }

Cheers
//Anders

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3931525#3931525

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3931525


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to