The WSDL documentation is very nice :-) On 1/3/07, Richard G. Reyes <[EMAIL PROTECTED]> wrote:
Hi All, I hope somebody here can help us to access this web services… http://www.sipfoundry.org/pub/sipXconfig/ws-api-3.2/ -- PhoneService – managePhone method. We are trying to create a java client for this service using the this ruby template… http://scm.sipfoundry.org/rep/sipX/main/sipXconfig/web/test/org/sipfoundry/sipxconfig/api/PhoneServiceTestApi.rb Please see test_addRemoveLine Some reference here… http://sipx-wiki.calivia.com/index.php/SipX_ConfigServer_SOAP_API We have successfully called the addPhone method from the PhoneService and the addUser method of the UserService. But the managePhone method is a it complicated for us.. Heres our code… Service service = new Service(); Call call = (Call) service.createCall(); call.setUsername( this.getSipAdminUsername() ); call.setPassword(this.getSipAdminPasswd() ); call.setTargetEndpointAddress( new java.net.URL(this.getPhoneUrl())); call.setOperationName(new QName(this.getUrnNameSpace(),"ManagePhone" )); QName qnManagePhone=new QName(this.getUrnNameSpace(),"ManagePhone" ); call.addParameter("ManagePhone",qnManagePhone, ParameterMode.IN); call.setReturnType(qnManagePhone); PhoneSearch phoneSearch=new PhoneSearch(); ManagePhone managePhone = new ManagePhone(); //Create Line objects to bind user data to phone Line phoneLine = new Line(); phoneLine.setUserId(vxorder.getSipUsername() ); phoneLine.setUri(this.getUri()); phoneSearch.setBySerialNumber(vxorder.getMacAddress()); managePhone.setAddLine(phoneLine); managePhone.setGenerateProfiles(true); managePhone.setSearch(phoneSearch); call.invoke(new Object[] {managePhone}); Heres our error… 2007-01-03 10:56:30,594 ERROR [com.voxsant.rtbedaemon.AxisWSAddLine] - There was an error while trying to subscribe phone to Sipx. AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: Invalid element in org.sipfoundry.sipxconfig.api.ManagePhone - ManagePhone faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:voxantsipx.solegysystems.com org.xml.sax.SAXException: Invalid element in org.sipfoundry.sipxconfig.api.ManagePhone - ManagePhone at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) at Thanks in advance. Richard
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
