I renamed the *.wsdl and the java interface and added ur note but then it gives
me an error:
No WSDL interface definition for CreditCardValidation/{2}
but the WSDL is present and the defined portType etc too.
If i remove the <wsdl.interface ...> and use the plain <binding.ws ...> it
seems that something is happening tho
an error - The system cannot infer the transport information from the / URL.
pops up then :(
> -----Ursprüngliche Nachricht-----
> Von: "Hatfield, Dan" <[email protected]>
> Gesendet: 18.01.10 21:35:54
> An: "[email protected]" <[email protected]>
> Betreff: RE: Binding to external Webservices
> Based on your examples, it seems like it is probably having trouble lining up
> interfaces/names...
> Have you tried
>
> @Reference(name="CreditCardValidation")
>
> ?
>
> ________________________________________
> From: Stefan Kolb [[email protected]]
> Sent: Monday, January 18, 2010 3:25 PM
> To: [email protected]
> Subject: Binding to external Webservices
>
> Im trying to build a simple Composite that includes a component which uses a
> reference to invoke an external webservice.
>
> PaymentComposite (Composite) --> CreditCardComponent (Component) -->
> CreditCardValidation (Reference)
>
> Composite Code:
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="PaymentComposite">
>
> <component name="CreditCardComponent">
> <implementation.java class="implementation.CreditCardPaymentImpl"/>
>
> <reference name="CreditCardValidation">
> <interface.wsdl
> interface="http://www.webservicex.net#wsdl.interface(CCCheckerSoap)"/>
> <binding.ws
> wsdlElement="http://www.webservicex.net#wsdl.port(CCChecker/CCCheckerSoap)" />
> </reference>
> </component>
>
> </composite>
>
> As an example im using the Creditcard Webservice from webservicex.net.
>
> 1. I included the *.wdsl in the root of the project (CreditCard.wsdl).
> 2. I did a mapping of the *.wsdl to a Java Interface (Is that always
> necessary? If i want to use it in Java yes?!) -> CreditCard.java
>
> @Remotable
> public interface CreditCard {
> public String ValidateCardNumber(String cardType, String cardNumber);
> }
>
> 3. I injected the Reference in my Impl (CreditCardPaymentImpl)
>
> @Reference
> public void setCreditCard(CreditCard creditCard) {
> System.out.println("Injected Service");
> this.creditCard = creditCard;
> }
>
> 4. Tried to use this scenario in a client class
> SCADomain scaDomain = SCADomain.newInstance("PaymentComposite.composite");
> CreditCardPayment helloWorldService =
> scaDomain.getService(CreditCardPayment.class, "CreditCardComponent");
> ...
>
> But i still get the error
> - Reference not found for component reference: Component =
> CreditCardComponent Reference = CreditCardValidation
>
> What am i doing wrong? I tried to use several things there and ended up
> totally confused because this trivial looking thing doesnt work :(
>
> Sincerely Stefan
>
>
> ___________________________________________________________
> Preisknaller: WEB.DE DSL Flatrate für nur 16,99 Euro/mtl.!
> http://produkte.web.de/go/02/
___________________________________________________________
Preisknaller: WEB.DE DSL Flatrate für nur 16,99 Euro/mtl.!
http://produkte.web.de/go/02/