01-16-2015 05:29 AM
We are using AXL API to update line CSS. We are updating based on DN. In CUCM we have created 2 CSS as CSS1 and CSS2. We want to change CSS from CSS2 to CSS1. Our code is as below -
UpdateLineReq objUpdateLineReq=new UpdateLineReq();
XFkType xfkCSS = new XFkType();
xfkCSS.setValue("CSS1");
JAXBElement<XFkType> jaxbCssLine = new JAXBElement(new QName(XFkType.class.getSimpleName()), XFkType.class, xfkCSS);
jaxbCssLine.setValue(xfkCSS);
objUpdateLineReq.setPattern("2004");
objUpdateLineReq.setShareLineAppearanceCssName(jaxbCssLine);
StandardResponse objStandardResponse= objAXLPort.updateLine(objUpdateLineReq);
System.out.println(objStandardResponse);
I don't get any exception but CSS on line doesn't change.
Can you please suggest what else we need to do?
Regards,
Umesh
Solved! Go to Solution.
01-16-2015 02:10 PM
Okay - here's the fix:
JAXBElement<XFkType> jaxbCssLine = new JAXBElement<XFkType>(new QName("shareLineAppearanceCssName"), XFkType.class, xfkCSS);
Your code was creating this...
<XFkType>CSS1</XFkType>
...when it should have been creating this...
<shareLineAppearanceCssName>CSS1</shareLineAppearanceCssName>
01-16-2015 09:40 AM
Any input will help me to move fast. It's urgent.
Regards,
Umesh
01-16-2015 10:10 AM
Are you wanting to update the Calling Search Space under "Directory Number Settings" on the Directory Number Configuration, or the CSS for some other feature? Can you point out the corresponding field in the CUCM Admin GUI?
01-16-2015 01:12 PM
I am able to update the Calling Search Space of the Line with this basic request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<soapenv:Header/>
<soapenv:Body>
<ns:updateLine>
<pattern>4545</pattern>
<shareLineAppearanceCssName>CSS_1</shareLineAppearanceCssName>
</ns:updateLine>
</soapenv:Body>
</soapenv:Envelope>
I can see that the Calling Search Space got updated in the CUCM Admin GUI (under Directory Number Settings). I used SoapUI to send this request. Are you able to update the CSS outside of your app; by using tools like SoapUI?
01-16-2015 02:10 PM
Okay - here's the fix:
JAXBElement<XFkType> jaxbCssLine = new JAXBElement<XFkType>(new QName("shareLineAppearanceCssName"), XFkType.class, xfkCSS);
Your code was creating this...
<XFkType>CSS1</XFkType>
...when it should have been creating this...
<shareLineAppearanceCssName>CSS1</shareLineAppearanceCssName>
01-16-2015 07:10 PM
Thanks Nicholas. I will try with ur fix today.
Regards,
Umesh
01-16-2015 09:35 PM
My pleasure. If you encounter any more problems, post them here!
01-16-2015 11:46 PM
Thanks Nicholas. Your fast response made our life easy
01-17-2015 01:33 AM
Most of the update request (e.g. updatePhone, updateLine) returns StandardResponse which is a alphanumeric string (like uuid).
Is there any way to check either my request executed successfully or failed?
Regards,
Umesh
01-20-2015 11:49 PM
Nicholas,
I would like to modify the "Line Text Label" in device line (DN).
I am able to get using RPhoneLine object but unable to update.
I tried using UpdatePhoneReq & UpdateLineReq but didn't find any method like setLabel.
Can u please let me know the class & methid name which needs to be used for this?
Regards,
Umesh
01-21-2015 07:50 AM
You set the label in the XPhoneLine object, which has a setLabel method. A List of XPhoneLine somehow maps to the UpdatePhone.Lines. I haven't played around with this, so I can't give you a code example, but it looks like you manipulate it differently than most APIs, since UpdatePhoneReq SetLines takes UpdatePhoneReq's Lines as an argument like so:
public void setLines(UpdatePhoneReq.Lines value)
01-21-2015 08:38 PM
Is there any document where I can find the difference in XPhone & RPhone?
Also getPhoneResponse.getReturn().getPhone().getLines() retruns RPhone.Lines whereas UpdatePhoneReq.setLines takes parameter as XPhoneLine.
I tried to type cast from RPhoneLine to XPhoneLine but it's not allowing.
What I am trying after ur anser is -
RPhone objRPhone= getPhoneResponse.getReturn().getPhone();
RPhone.Lines objLines= objRPhone.getLines();
UpdatePhoneReq objUpdatePhoneReq1=new UpdatePhoneReq();
objUpdatePhoneReq1.setName("SEPD824BDBA0911");
objUpdatePhoneReq1.setLines(x1); //this line gives type error x1
Regards,
Umesh
01-22-2015 07:44 AM
I don't know of any documentation for the ws-import generated API for Java, which makes sense, since you can use Java in so many different ways in order to use AXL. You could simply send and receive raw XML, for example.
When I do a ws-import, I use the "keep" switch in order to keep all the Java source files. That way I can look at the actual Java source for the APIs. I find this helpful.
I'm not sure from your post if you know this already, but Lines is not a single XPhoneLine. It is a List of multiple lines.
List<XPhoneLine>
01-21-2015 07:23 AM
No, there's no way to know if the CSS changed properly from the returned XML. You can do a follow-up getLine like this, with only the one returnedTag to see if the CSS changed to what you expect:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<soapenv:Header/>
<soapenv:Body>
<ns:getLine sequence="1">
<pattern>1000</pattern>
<returnedTags>
<shareLineAppearanceCssName />
</returnedTags>
</ns:getLine>
</soapenv:Body>
</soapenv:Envelope>
It should be easy to do this with Java.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide