Prev: Did not understand "MustUnderstand" header messagewith WCF Service
Next: CFMenu Submenu Hidden By CFLayoutArea
From: marekss on 7 Jul 2008 16:13 Here is my code; <cfxml variable="xmlobject"> <cfoutput> <Orders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="" Version="1.0" xsi:noNamespaceSchemaLocation="Order.xsd"> <Order> <Customer_Data> <SkipDupCheck>N</SkipDupCheck> <UserId>public</UserId> <SkipAddressCheck>Y</SkipAddressCheck> <ChainNbr /> <StoreNbr /> <SansNbr /> <CustNbr /> <BillTo>23423</BillTo> <ShipTo>43242</ShipTo> <MacAcct /> <ZipStateCountry /> <ShortName /> <OneTimeShipInfo> <Name>Joe Test</Name> <Addr1>11 Test Ave</Addr1> <Addr2>Town Hall</Addr2> <Addr3 /> <City>Bethlehem</City> <State>NY</State> <ZipPostalCode>112222323</ZipPostalCode> <CountryCode>US</CountryCode> </OneTimeShipInfo> <BillToOnly>N</BillToOnly> </Customer_Data> <CreditCardInfo> <CardNbr /> <ExpDate /> <AreaCode /> <PhoneNbr /> <Contact /> <Trigger /> </CreditCardInfo> <Deliver_Option> <ShipVia /> <FreightTrm /> <ArriveBy /> <DeliverOn /> <NotBefore /> <ShipOn /> <FreightAmt /> <HandlingFee /> </Deliver_Option> <SpecialInstructions> <AuthAppearance /> <SpecInstr1 /> <SpecInstr2 /> <SpecInstrComments1 /> <SpecInstrComments2 /> <SpecInstrComments3 /> </SpecialInstructions> <ReceiptDate /> <OrderSource>DC</OrderSource> <OrderType>NC</OrderType> <RushCode>N</RushCode> <MarkFor>test</MarkFor> <CartonRound /> <BatchNbr /> <PrintOption /> <StatusOverride /> <WarehouseCode /> <Royalty /> <Facility /> <SalesHurt /> <BarCodeNumber /> <AddSource /> <Voucher /> <TaxClassOver /> <InvoiceRoute /> <BOShipDate /> <NotToExceed /> <PrintBindOrderNumber /> <ShipWOFlag /> <WorkOrderNumber /> <CancelDate /> <CancelDays /> <AdditionalDiscount /> <Promotion /> <CustomerPurchaseOrder>312321</CustomerPurchaseOrder> <OvrdDisc /> <DatingCode /> <OvrNetPrice /> <AccountDiscountClassOvrd /> <BOPref /> <NYPPref /> <BSBPref /> <InvoiceCombinationPref /> <LineItems> <LineItem> <ItemNumber>1</ItemNumber> <Qty>1</Qty> <AltTitleCode /> <ISBN>1234567890</ISBN> <PromoKey /> <NetPrice /> <Discount /> <FreightTerms /> <TitleStatusOvrd>AS</TitleStatusOvrd> <SubstituteOvrd /> <TransportOvrd /> <BackOrderCanOvrd /> </LineItem> </LineItems> </Order> </Orders> </cfoutput> </cfxml> <cfset ws_obj = CreateObject("webservice", "http://host/webservices/orderentry/orderentry.asmx?WSDL")> <cfdump var="#ws_obj#"> <cfset ws_ret_ = ws_obj.placeOrder(#xmlobject#)>
From: BKBK on 7 Jul 2008 16:17 An XML document object created by <cfxml> is particularly a Coldfusion object. Chances are, it is unknown to .NET. What happens when you invoke the service using XML as text instead?
From: marekss on 7 Jul 2008 16:31 When I supply a string I get following error: coldfusion.xml.rpc.ServiceProxy$ServiceMethodNotFoundException: Web service operation "placeOrder" with parameters
From: marekss on 7 Jul 2008 16:34 Here is a code _placeOrder.java generated using wsdl2java.exe utility: /** * _PlaceOrder.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package com.domain.services; public class _PlaceOrder implements java.io.Serializable { private com.domain.services._PlaceOrder_orderData orderData; public _PlaceOrder() { } public com.domain.services._PlaceOrder_orderData getOrderData() { return orderData; } public void setOrderData(com.domain.services._PlaceOrder_orderData orderData) { this.orderData = orderData; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof _PlaceOrder)) return false; _PlaceOrder other = (_PlaceOrder) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.orderData==null && other.getOrderData()==null) || (this.orderData!=null && this.orderData.equals(other.getOrderData()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getOrderData() != null) { _hashCode += getOrderData().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(_PlaceOrder.class); static { typeDesc.setXmlType(new javax.xml.namespace.QName("http://services.domain.com/", ">PlaceOrder")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("orderData"); elemField.setXmlName(new javax.xml.namespace.QName("http://services.domain.com/", "orderData")); elemField.setXmlType(new javax.xml.namespace.QName("http://services.domain.com/", ">PlaceOrder>orderData")); elemField.setMinOccurs(0); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } } }
From: GArlington on 8 Jul 2008 05:31 On Jul 7, 9:13 pm, "marekss" <webforumsu...(a)macromedia.com> wrote: > Here is my code; Insert <cfprocessingdirective suppresswhitespace="Yes"> and move <cfoutput> outside <cfxml ...> tag > <cfxml variable="xmlobject"> > <cfoutput> > <Orders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="" > Version="1.0" xsi:noNamespaceSchemaLocation="Order.xsd"> > <Order> > <Customer_Data> > <SkipDupCheck>N</SkipDupCheck> > <UserId>public</UserId> > <SkipAddressCheck>Y</SkipAddressCheck> > <ChainNbr /> > <StoreNbr /> > <SansNbr /> > <CustNbr /> > <BillTo>23423</BillTo> > <ShipTo>43242</ShipTo> > <MacAcct /> > <ZipStateCountry /> > <ShortName /> > <OneTimeShipInfo> > <Name>Joe Test</Name> > <Addr1>11 Test Ave</Addr1> > <Addr2>Town Hall</Addr2> > <Addr3 /> > <City>Bethlehem</City> > <State>NY</State> > <ZipPostalCode>112222323</ZipPostalCode> > <CountryCode>US</CountryCode> > </OneTimeShipInfo> > <BillToOnly>N</BillToOnly> > </Customer_Data> > <CreditCardInfo> > <CardNbr /> > <ExpDate /> > <AreaCode /> > <PhoneNbr /> > <Contact /> > <Trigger /> > </CreditCardInfo> > <Deliver_Option> > <ShipVia /> > <FreightTrm /> > <ArriveBy /> > <DeliverOn /> > <NotBefore /> > <ShipOn /> > <FreightAmt /> > <HandlingFee /> > </Deliver_Option> > <SpecialInstructions> > <AuthAppearance /> > <SpecInstr1 /> > <SpecInstr2 /> > <SpecInstrComments1 /> > <SpecInstrComments2 /> > <SpecInstrComments3 /> > </SpecialInstructions> > <ReceiptDate /> > <OrderSource>DC</OrderSource> > <OrderType>NC</OrderType> > <RushCode>N</RushCode> > <MarkFor>test</MarkFor> > <CartonRound /> > <BatchNbr /> > <PrintOption /> > <StatusOverride /> > <WarehouseCode /> > <Royalty /> > <Facility /> > <SalesHurt /> > <BarCodeNumber /> > <AddSource /> > <Voucher /> > <TaxClassOver /> > <InvoiceRoute /> > <BOShipDate /> > <NotToExceed /> > <PrintBindOrderNumber /> > <ShipWOFlag /> > <WorkOrderNumber /> > <CancelDate /> > <CancelDays /> > <AdditionalDiscount /> > <Promotion /> > <CustomerPurchaseOrder>312321</CustomerPurchaseOrder> > <OvrdDisc /> > <DatingCode /> > <OvrNetPrice /> > <AccountDiscountClassOvrd /> > <BOPref /> > <NYPPref /> > <BSBPref /> > <InvoiceCombinationPref /> > <LineItems> > <LineItem> > <ItemNumber>1</ItemNumber> > <Qty>1</Qty> > <AltTitleCode /> > <ISBN>1234567890</ISBN> > <PromoKey /> > <NetPrice /> > <Discount /> > <FreightTerms /> > <TitleStatusOvrd>AS</TitleStatusOvrd> > <SubstituteOvrd /> > <TransportOvrd /> > <BackOrderCanOvrd /> > </LineItem> > </LineItems> > </Order> > </Orders> > </cfoutput> > </cfxml> > <cfset ws_obj = CreateObject("webservice", > "http://host/webservices/orderentry/orderentry.asmx?WSDL")> > <cfdump var="#ws_obj#"> > <cfset ws_ret_ = ws_obj.placeOrder(#xmlobject#)>
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Did not understand "MustUnderstand" header messagewith WCF Service Next: CFMenu Submenu Hidden By CFLayoutArea |