0 Replies Latest reply on Dec 22, 2009 4:39 PM by pvent

    Missing EndpointReference port meta data

    pvent

      I'm trying to get a web service port given an endpoint reference, but every time I try, I get this exception:

       

      javax.ejb.EJBException: javax.xml.ws.WebServiceException: Cannot get port meta data for: package.ClassName

      My first try was to create a W3CEndpointReference object given a harcoded XML, but when outputting the resulting endpoint XML, port meta data was missing from the object.

       

      The static XML I used is this:

      <EndpointReference
          xmlns:wsa="http://www.w3.org/2005/08/addressing" 
          xmlns:wsat="http://docs.oasis-open.org/ws-tx/wsat/2006/06"
          xmlns="http://www.w3.org/2005/08/addressing">
          <wsa:Address>http://localhost:20091/bank/participant</wsa:Address>
          <wsa:ServiceName PortName="wsat:ParticipantPort">wsa:ParticipantService</wsa:ServiceName>
          <ReferenceParameters>
              <wsa:Participant>1</wsa:Participant>
          </ReferenceParameters>
          <Metadata/>
      </EndpointReference>

       

      And I use this sentence to create the W3CEndpointReference

       

      W3CEndpointReference epr = new W3CEndpointReference(new StreamSource(new StringReader(customXML)));
      

       

      But resulting EPR does not contain ServiceName node.

       

      My second try, based on consulting internal JBoss code, was to create a custom MyEndpointReference class (extending EndpointReference) with code from NativeEndpointReference. Creating an instance of my class does show the ServiceName node, but calling getPort still results on the same exception.

       

      Is there a way to succesfully get this port (using information that should be on the endpoint reference but isn't there)? The interface class also contains this information, but seems to be ignored.

       

      Exception is thrown from the source org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl (line 238).

       

      Thanks!