none
problems with Consuming WCF service in SoapUI RRS feed

  • Question

  • Hi,

     

    Rather new to WCF!!

    I have created a simple WCF web service in a Console application and successfully tested consuming it in a .Net Console application client.

    i have used the default binding behaviour stuff in my host as below:

    Uri baseAddress = new Uri("http://localhost:8000/ServiceModelSamples/Service");
    
          
          ServiceHost selfHost = new ServiceHost(typeof(CalculatorService), baseAddress);
    
          try
          {
    
    
            
            selfHost.AddServiceEndpoint(
              typeof(ICalculator), //the contract
              new WSHttpBinding(), //the binding
              "CalculatorService"); //the endpoint address
    
    
            
            ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
            smb.HttpGetEnabled = true;
            selfHost.Description.Behaviors.Add(smb);
    
            
            selfHost.Open();
            Console.WriteLine("The service is ready at {0}.", baseAddress);
            Console.WriteLine("Press <ENTER> to terminate service.");
            Console.WriteLine();
            Console.ReadLine();
    
            // Close the ServiceHostBase to shutdown the service.
            selfHost.Close();
          }
          catch (CommunicationException ce)
          {
            Console.WriteLine("An exception occurred: {0}", ce.Message);
            selfHost.Abort();
          }
    

    my problem is that I would like to consume this service in SoapUI. First of all I do not know what to put in the soap header of incoming messages to this service in soapui and secondly the calls to it gets Timed out!!

     

    I also tried invoking one of its methods in ActiveVos Designer but the same problem with the header and got this error:

    < faultstring > WSSTUBE0023: Error in creating new instance of SecurityClientTube </ faultstring >

    Any help greately appreciated.

    Thursday, September 9, 2010 1:07 PM

Answers

  • This does not seem a policy related issue.

    Are you sure there is network access between the two computers?

    Configure WCF log on the WCF server to see if it got any message at all.

    I wodul also recommend to ask in an ActiveVOS forum.


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Thursday, September 9, 2010 2:46 PM

All replies

  • You seem to use the default WSHttpBinding settings.

    SoapUI does not support testing this service as it has WCF proprietary format.

    Try to change / add a basicHttpBinding endpoint.


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Thursday, September 9, 2010 1:18 PM
  • Thanks very much for the reply.

    So if I stick to WSHttpBinding and try to invoke it from my ActiveVOS orchestration bpel (forget about SoapUI now), still I am not able to figure out the security policy required to set the header for this soap call.

     

    How do I figure it out of my exposed wsdl??

    Thursday, September 9, 2010 1:31 PM
  • I am in doubt if ActiveVOS can access it either.

    Even if it can - it is best if you first use basicHttpBinding (without security) to ensure initial integration is ok and then add security.


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Thursday, September 9, 2010 1:34 PM
  • right, thanks!

     

    can you please shed some light on how I can possibly add the new endpoint for binding="basicHttpBinding" as well as the existing one in my Console application??

    It'll save the day...

     

    many many thanks

    Thursday, September 9, 2010 1:47 PM
  • It is just another call to AddServiceEndpoint:

     

     selfHost.AddServiceEndpoint(
         typeof(ICalculator), //the contract
         new BasicHttpBinding(), //the binding
         "CalculatorServiceBasic"); //the endpoint address

     


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Thursday, September 9, 2010 1:52 PM
  • Thanks.

     

    I got the basic response in SoapUI but not in my bpel invoke. it returns

    < faultstring > java.net.ConnectException: Connection refused: connect </ faultstring >

    my endpoint reference in my Activevos pdd file looks like this:


    <wsa:EndpointReference xmlns:ns5="http://tempuri.org/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <wsa:Address>http://localhost:8000/ServiceModelSamples/Service/CalculatorServiceBasic</wsa:Address>
      <wsa:Metadata>
       <wsa:ServiceName PortName="BasicHttpBinding_ICalculator">ns5:CalculatorService</wsa:ServiceName>
      </wsa:Metadata>
    </wsa:EndpointReference>
    
    

    I wonder if I need to put anything as policy assertions?!!!


    Thursday, September 9, 2010 2:17 PM
  • This does not seem a policy related issue.

    Are you sure there is network access between the two computers?

    Configure WCF log on the WCF server to see if it got any message at all.

    I wodul also recommend to ask in an ActiveVOS forum.


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Thursday, September 9, 2010 2:46 PM
  • Great help! Thanks Yaron.

     

     

    Thursday, September 9, 2010 2:48 PM
  • Hi again,

     

    I still do not know what the policy assertions, authentication etc would be when I define  'WSHttpBinding' as the binding when consuming this web service?!

     

     

    Wednesday, September 15, 2010 3:13 PM
  • It depends which settings have you configured on the binding.

    You can try it and see in the wsdl how the policy looks like.


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog
    Friday, September 17, 2010 2:32 PM
  • Yaron/daregazi,

    Hi

    My SOA Version 11.1.1.3

    I am having issues invoke target system WCF -Basic HTTP Binding WSDL, from SOA/BPEL. I see some interoperability issues with WSHTTP BInding WCF, but I am not sure about Basic HTTP Binding WSDL.

    I get an java.lang.RuntimeException: java.lang.StackOverflowError Exception(see below ) when I load the BasicHTTPBinding WSDL URL into my Partner Link,so I tried importing  the WSDL file and  I get same  exception.

    I even used HTTPBinding Adapter,  selected the  schemas and when I invoke I get Oracle Fabric Invocation Exception.Strangely, I can invoke from SOAP UI

     I see one of you were successful invoking WCF service from BPEL?? . I would appreciate if you could provide some inputs to trouble shoot this issue.

    Exception:

    java.lang.RuntimeException: java.lang.StackOverflowError
        at oracle.tip.tools.ide.pm.modules.sca.ide.JDevScaProcessListener.modelChanged(JDevScaProcessListener.java:78)
        at oracle.tip.tools.ide.common.bpelparser.implementations.xmlef.ProcessImpl.fireModelChanged(ProcessImpl.java:130)
        at oracle.tip.tools.ide.pm.bpelgraph.editors.partnerlink.PartnerLinkEditPage.firePartnerLinkCreated(PartnerLinkEditPage.java:1426)
        at oracle.tip.tools.ide.pm.bpelgraph.editors.partnerlink.PartnerLinkEditPage.saveToModel(PartnerLinkEditPage.java:360)
        at oracle.tip.tools.ide.pm.bpelgraph.editors.partnerlink.PartnerLinkEditPage.saveChanges(PartnerLinkEditPage.java:224)
        at oracle.tip.tools.ide.pm.bpelgraph.editors.partnerlink.PartnerLinkDialog.save(PartnerLinkDialog.java:278)
        at oracle.tip.tools.ide.pm.bpelgraph.editors.partnerlink.PartnerLinkDialog.actionPerformed(PartnerLinkDialog.java:293)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6263)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6028)
        at java.awt.Container.processEvent(Container.java:2041)
        at java.awt.Component.dispatchEventImpl(Component.java:4630)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Component.dispatchEvent(Component.java:4460)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
        at java.awt.Container.dispatchEventImpl(Container.java:2085)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4460)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
        at java.awt.Dialog$1.run(Dialog.java:1046)
        at java.awt.Dialog$3.run(Dialog.java:1098)
        at java.security.AccessController.doPrivileged(Native Method)

     

    Thanks

    Friday, October 15, 2010 2:03 PM